Closed Ravi-Prasad closed 6 years ago
This sounds like a phantomJS issue. Do you have anything that indicates that the problem is coming from the Serenity code (e.g. it works with raw webdriver but not with a WebElementFacade?
No, we have tried with raw webdriver alone but not with WebElementFacade . It was working fine earlier but lately we are getting org.openqa.selenium.NoSuchElementException: Timed out after 2 seconds. Element not found error message. As I said earlier it is working fine in my local and on Jenkins Slave machine(Windows). But getting error when we hit the pipeline runs on Linux. We are using below JS to click the element - JavascriptExecutor executor = (JavascriptExecutor) consolePage.getDriver(); executor.executeScript("arguments[0].click();", element);
This sounds like an environment-specific issue, possibly a PhantomJS bug. If it works locally it is unlikely to be a WebDriver issue. Have you considered using chrome in headless mode, or xvfs on the Linux environment (phantom hs is not always 100% reliable)
haven't tried with chrome headless mode. Not sure how to use xvfs on the Linux environment. Thanks
Closing as unrelated to serenity-cucumber.
We are able to click hyperlink on windows using JS Executor but not able to click hyperlink on Linux. We are using headless browser ie., PhantomJs. We have tried Actions and WebElement Click and JS Executor Click to click the hyperlink but none of the option worked out. Thanks in advance