1

the application under test is an internal site. i am not able to select the new window when i run the test in IE. this is the part of my test that is having the error

Run report
    input text          txtSearchKey    TestProduct
    click element       searchButton
    click element       xpath=//*[@id='tblProductSelect']/tbody/tr[1]/td
    wait until element is not visible       loadingDiv
    click button        id=btnRunReport  
    wait until element is not visible       loadingDiv
    get window identifiers
    get window names
    select window                       Product Report

when btnRunReport is clicked, the application opens in a new tab and shows the report. this is whats happening when a user goes to the application and generates a report in chrome or in IE.

when i run this test, it works fine in Chrome. the report opens in a new tab and i can select that tab. in IE, it opens in new window, which is expected behavior (reference: https://github.com/SeleniumHQ/selenium/issues/5108).

i have no problem with it opening in new window but i am not able to select that new window. im getting this error - ValueError: Unable to locate window with handle or name or title or URL 'Product Report'

the "get window identifiers" and "get window names" only gets 1 browser. it doesnt seem to recognize the second one. also, on the Suite Teardown, the second window doesnt get closed.

thanks. i hope someone can help me.

Here are my system specs:

  • OS - Windows 7
  • Browser - IE11
  • Robot Framework Version - 3.0.2
  • IEDriverServer version - 3.4
  • Selenium2Library version - 1.8.0
jowsef
  • 23
  • 3
  • Can you show us a [mcve]? – Bryan Oakley Jan 18 '18 at 17:04
  • hi Bryan. i updated my question. let me know if you need more info to be able to help me. thanks! – jowsef Jan 18 '18 at 19:53
  • Is `wait until element is not visible loadingDiv` sufficient to wait for the other window to load? If not, add a `Sleep 10s` (Or whatever makes sense) to ensure that the window keywords are not running to soon. – A. Kootstra Jan 19 '18 at 07:17
  • i replaced wait until element with sleep 20s and it still not recognizing the new window. – jowsef Jan 19 '18 at 16:31

0 Answers0