How do I test modal dialogs with Selenium?

前端 未结 4 1563
野的像风
野的像风 2021-01-05 03:03

I\'m getting started with Selenium IDE and trying to test a webapp that\'s full of modal dialogs (window.showModalDialog).

Recording the test seems to w

4条回答
  •  时光说笑
    2021-01-05 03:34

    This is how I handle pop up alert in Selenium IDE

    right click on the element (in this case your pop up window) there are some command you can choose. There's also a show all available commands whiche might be a help. You should use AssertElementPreset and I guess the best locator in this case is CSS. So you can choose AssertElementPresent.

    Or

    you can use two command on Selenium IDE

    selectWindow | null
    verifyElementPresent | css=div.content
    

    Hope this helps!

提交回复
热议问题