Driver not interacting with Page after accepting a popup or Alert.
System
- Version: 0.22.0
- Platform: Win7
- Firefox: 60.0.1
- Selenium: 3.12
Testcase
on clicking go button, A popup will appear. Once, we accept the popup, next page. Driver is not able to find the element in the page which is present in the page.
FirstDemo.zip the attachment is the Web App model.
Test Script is as follows:
FirefoxDriverManager.getInstance().setup(); WebDriver driver = new FirefoxDriver(); driver.manage().window().maximize(); driver.get("http://localhost:8080/FirstDemo/HomePage.jsp"); Thread.sleep(5000); driver.findElement(By.xpath("//input[@type='submit']")).click(); Thread.sleep(5000); if (isAlertPresent()) { driver.switchTo().alert().accept(); } String text = driver.findElement(By.xpath("//div[contains(text(),'User Status :')]")).getText(); System.out.println(text);
Error Logs: org.openqa.selenium.NoSuchElementException: Unable to locate element: //div[contains(text(),'User Status :')] For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Trace Logs: TraceLogs.txt
Could you please attach a trace-level log from geckodriver? Read more about reporting actionable bugs in our contribution guidelines.
@whimboo Please find the Trace Level logs attached in the issue details
The log doesn't show that the alert is getting accepted. There is no such command called for Marionette. What is isAlertPresent() actually doing? Which binding of Selenium are you using?
No response from reporter. Closing the issue.
This issue has been automatically locked since there has not been any recent activity after it was closed. If you have run into an issue you think is related, please open a new issue.