Issue
i am trying to automate logout functionality for - https://opensource-demo.orangehrmlive.com/ I could log out using chrome and edge but firefox is not clicking the element and selecting logout.
new WebDriverWait(cdriver, 20).until(ExpectedConditions.elementToBeClickable(By.xpath("//*[@id="welcome"]"))).click();
new WebDriverWait(cdriver, 20).until(ExpectedConditions.elementToBeClickable(By.xpath("//a[contains(text(),"Logout")]"))).click();
Solution
Try using linktext
new WebDriverWait(cdriver, 20).until(ExpectedConditions.elementToBeClickable(By.linkText("Logout"))).click();
If it is still not working try clikcking using javascript
Answered By - Ketan Pardeshi
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.