I am writing a basic script of opening a website in twist using selenium. After execution of my script the execution window closes by itself. I want to keep that window in open state.. can someone help me in this?
What is that you are trying to do by keeping execution window open? If you want to take screenshots then selenium has api's to do this, or you can use some sort of thread sleep in your script to pause the execution and do your stuff. Currently twist doesnt support keeping execution window open after tests are executed, the reason is that if you are running test as part of build then you dont want your application to be left open.
Thanks for the information. This was really helpful.
Actually the web page I am accessing has two pop-ups on it on submission of forms. I wanted to handle those popups using selenium method 'Selenium.GetConfirmation()' but was not sure if OK is being selected on those pop-ups window to enable me to move to the next page.
I get back to the same home page after using the method getconfirmation()...
Can you please help me to handle the pop up windows on a web page?
I'm guessing its because of two pop-ups. Use getAlert() which will retrieve the message shown in the alert to understand which popup it is trying to click. Does it show both pop-ups one after the other or both together?
GetAlert doesnt seem to work as it says that there is no alert present. I also tried to use get confirmation for a scenario where there was only one pop-up window. That also is not working for me and displays me the same page again. Do u have any idea how to find the windowid of a pop-up window? I tried using seleniumIDE and IEDeveloperToolbar but both tools do not identify the windowid of the pop-up.
Plus, if you could suggest furthur in my problem, would be great..
What kind of control you are trying to test? Is it popup windows or alerts?
Selenium consumes alerts and you wont be able to see them when you execute selenium script. Alerts does not have any ids.
You can identify popup windows by its name.
I'm guessing yours is window as "getAlert" throws an error as no alert present. Is it a public website? Is it possible to send me the link? My id is nivetha@thoughtworks.com
Or, suggest me a date and time to have a call and webex session which will help me to understand better.
Comment
Hi Preeti,
What is that you are trying to do by keeping execution window open? If you want to take screenshots then selenium has api's to do this, or you can use some sort of thread sleep in your script to pause the execution and do your stuff. Currently twist doesnt support keeping execution window open after tests are executed, the reason is that if you are running test as part of build then you dont want your application to be left open.
Vinay-
Hi Vinay,
Thanks for the information. This was really helpful.
Actually the web page I am accessing has two pop-ups on it on submission of forms. I wanted to handle those popups using selenium method 'Selenium.GetConfirmation()' but was not sure if OK is being selected on those pop-ups window to enable me to move to the next page.
I get back to the same home page after using the method getconfirmation()...
Can you please help me to handle the pop up windows on a web page?
Regards,
Preeti
I'm guessing its because of two pop-ups. Use getAlert() which will retrieve the message shown in the alert to understand which popup it is trying to click. Does it show both pop-ups one after the other or both together?
Regards,
Nivetha.
Hi Nivetha,
GetAlert doesnt seem to work as it says that there is no alert present. I also tried to use get confirmation for a scenario where there was only one pop-up window. That also is not working for me and displays me the same page again. Do u have any idea how to find the windowid of a pop-up window? I tried using seleniumIDE and IEDeveloperToolbar but both tools do not identify the windowid of the pop-up.
Plus, if you could suggest furthur in my problem, would be great..
Regards,
Preeti
Hi Preeti,
What kind of control you are trying to test? Is it popup windows or alerts?
Selenium consumes alerts and you wont be able to see them when you execute selenium script. Alerts does not have any ids.
You can identify popup windows by its name.
I'm guessing yours is window as "getAlert" throws an error as no alert present. Is it a public website? Is it possible to send me the link? My id is nivetha@thoughtworks.com
Or, suggest me a date and time to have a call and webex session which will help me to understand better.
Regards,
Nivetha.