geckodriver icon indicating copy to clipboard operation
geckodriver copied to clipboard

Driver not interacting with Page after accepting a popup or Alert.

Open hariharanravichandran opened this issue 8 years ago • 5 comments

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

hariharanravichandran avatar Sep 28 '18 12:09 hariharanravichandran

Could you please attach a trace-level log from geckodriver? Read more about reporting actionable bugs in our contribution guidelines.

whimboo avatar Sep 28 '18 19:09 whimboo

@whimboo Please find the Trace Level logs attached in the issue details

hariharanravichandran avatar Oct 01 '18 09:10 hariharanravichandran

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?

whimboo avatar Oct 01 '18 09:10 whimboo

No response from reporter. Closing the issue.

whimboo avatar Nov 20 '18 13:11 whimboo

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.

lock[bot] avatar Aug 16 '19 15:08 lock[bot]