webdriver is not able to click on a hyperlink in firefox

后端 未结 6 2128
不思量自难忘°
不思量自难忘° 2021-01-16 23:01
package testproject;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.         


        
6条回答
  •  春和景丽
    2021-01-16 23:50

    I have posted this question in Jan saying that the web-driver was not able to click on the hyperlink and just now i got the solution. Actually the xpath for the hyperlink was not accurate. I had used this xpath- .//*[@id='gb']/div[1]/div[1]/div[1]/div[2] which was locating the logo but not the button.

    Today i changed it by .//*[@id='gb']/div[1]/div[1]/div[1]/div[2]/a and now its working absolutely fine.

    Please don't be angry on me because i was going through the questions which i had asked from the forum and found this question. I got the solution for the problem thats why i am sharing this.

提交回复
热议问题