I'm trying to click on a CSS menu
, first I need to hover over and then click a sub menu link
I am able to do this when i run my test as an individual or a JUnit
test, but when I run the same test from ant(I have created a batch file used to run the tests) hover does not work.
code for hovering and click on a sub menu link
String menuhoverlink = "//*[@id='orders']/a";
String sublink = "//*[@id='orders']/ul/li[4]/a";
Actions builder = new Actions(driver);
builder.moveToElement(driver.findElement(By.id(menuhoverlink))).build().perform();
driver.findElement(By.id(menuhoverlink))
- I need to understand why hovering and clicking on a sub menu link does not work when I run the test using ant?
- How to solve this issue?
Thanks in advance..!!