1

I'm writing a Selenium IDE script to test part of our website that opens a window that takes the user to a third party site that we integrate with. The test clicks a link on our website, that opens a new window on the third party site where we need to tick a checkbox and submit a form, at which point the window closes and we then need to check another page on our own website.

Our problem is that the script breaks at the Selenium selectWindow action, because it says that it cannot find a window with the given name. If we then manually run that line in the IDE, it works!

I have added numerous waits, pauses and other tricks to make sure that the window exists and has the correct title when the SelectWindow action is hit, but we still get the above error.

The script is...

click               link=activate
waitForPageToLoad   
selectWindow        Third party activation site

Are there any tricks to getting this to work?

GoatInTheMachine
  • 3,583
  • 3
  • 25
  • 35
  • I see you've tagged the question 'Firefox'. Have you tried it with other browsers? I've found that some things which break in Selenium on one browser work fine in another. – Spudley Apr 18 '11 at 11:28

1 Answers1

1

You dont need that waitForPageToLoad as i'm assuming the host page isn't reloading.

You may want to check out the api ( http://release.seleniumhq.org/selenium-remote-control/0.9.2/doc/java/com/thoughtworks/selenium/Selenium.html#selectWindow(java.lang.String) ) entry for the command. This is the java docs, but it the same for selenium IDE.

mark-cs
  • 4,677
  • 24
  • 32
  • Thanks, the `waitForPageToLoad` is just the latest in a string of attempts to make sure that the new page is loaded *and* has the correct name. – GoatInTheMachine Apr 18 '11 at 11:13