Selenium Issues

This forum is for Selenium specific usage or questions

This is a public Discussion Area  publicRSS

Post

    Preeti
    Window closes after execution
    Post posted December 16, 2009 by Preeti
    1977 Views, 5 Comment
    Topic:
    Window closes after execution
    Body:

    Hi,

    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?

    Cheers,

    Preeti

    Comment

    • Vinay Dayananda
      posted December 16, 2009 by Vinay Dayananda

      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-

    • Preeti
      posted December 18, 2009 by Preeti

      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

       

       

       

    • Nivetha
      posted December 20, 2009 by Nivetha

      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.

    • Preeti
      posted December 21, 2009 by Preeti

      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

       

       

       

    • Nivetha
      posted December 21, 2009 by Nivetha

      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.