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();
CodePudding user response:
Try using linktext
new WebDriverWait(cdriver, 20).until(ExpectedConditions.elementToBeClickable(By.linkText("Logout"))).click();
If it is still not working try clikcking using javascript