1

Summary: When I try to go to the third page in a web site I'm trying to screen scrape using Selenium and Chrome I can't find any elements on the third page.

I see Html for 2nd page in Driver.PageSource.

Steps:

  1. Navigate.GoToUrl("LoginPage.aspx")
  2. Find username and password elements.
  3. SendKeys to Username and Password.
  4. Find and click on Submit\Login button.
  5. Web Site displays main menu page with two Link style menu items.
  6. Find desired menu item using FindElement(By.LinkTest("New Person System")).
  7. Click on link menu item. This should get me to the "Person Search" page (the 3rd page).
  8. Try to wait using WebDriverWait for element on "Person Search" page. This fails to find element on new page after 5-10 seconds.
  9. Instead of using WebDriverWait I then simply wait 5 or 10 seconds for page to load using Thread.sleep(5000). (I realize WebDriverWait is the better design option.
  10. Try to find link with text "Person".
  11. Selenium fails to find link tag.

I see desired "Person Search" page displayed in Chrome.

I see last page Html in ChromeDriver.PageSource.

  • Chrome geckodriver.exe. Build 7/21/2017.
  • NUnit 3.7.1
  • Selenium 3.4
  • VB

I used IE for another project with similar environment. Didn't have a problem getting to any page (once I coded Selenium correctly).

The web site I'm trying to screen scrape only supports recent IE version. I'm testing a legacy app for another project that requires IE 8. So using IE is out of the question.

Maybe I should try Firefox...

Mohsin Awan
  • 1,176
  • 2
  • 12
  • 29
CoolBreeze
  • 381
  • 4
  • 14
  • 1
    It's a wild guess unless you can show some of your code that handles this transition from the 2nd to the 3rd page, and some `html` would help also. It sounds like you've got a stray `driver` somewhere, or the 3rd page is opening in a new tab and you need to switch to it. – mrfreester Aug 03 '17 at 19:15
  • You can check this Answer [**how to handle mutliple windows in selenium webdriver**](https://stackoverflow.com/questions/45455402/how-to-handle-mutliple-windows-in-selenium-webdriver-need-to-switch-from-second/45459457) – undetected Selenium Aug 04 '17 at 02:54

0 Answers0