3

I am new in Selenium automation. Could you please explain me how to use this (if one exists) tag? It would be really helpful if you can give example.

The scenario where I am facing problem is: there is a save button, if we click on it a dialog box pops up. I need to enter some text in two text boxes and press save/cancel button on the same dialog. I am using Selenium as a tool and Python as a scripting language. Any help on this will be appreciated.

Thanks in advance!

2 Answers 2

1
sel.click("idOfSaveButton")
sel.wait_for_pop_up("popupWindowName", "30000")
sel.select_window("name=popupWindowName")
sel.type("idOfTextBox1", "someText")
sel.type("idOfTextBox2", "someText")
sel.click("idOfCloseButton")
sel.select_window("null")

You can also select the popup window using title=.

Sign up to request clarification or add additional context in comments.

1 Comment

If the dialog box is native application like in most of the cases then this will not work
0

You can wait for the confirm box, then switch to it and do whatever you want. I asked familiar question before and the answer is here. Hope it helps.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.