Handling browser pop-up windows with Selenium

后端 未结 5 1592
长情又很酷
长情又很酷 2020-12-14 08:41

We are running Selenium regression tests against our existing code base, and certain screens in our web app use pop-ups for intermediate steps.

Currently we use the

5条回答
  •  孤街浪徒
    2020-12-14 09:09

    I needed to select an iframe within a popup window and fill out a form. I had trouble using the selectWindow cmd where selenium couldn't find my iframe, so I removed the command.

    This selenese worked well for me (where the iframe title and id = account_frame) :

    
      click
      //a[@class='item_add']
      
    
    
      windowFocus
      account_frame
      
    
    
      waitForPopUp
      account_frame
      10000
    
    

提交回复
热议问题