Saturday, March 8, 2008

Select_window_ok("mainframe")

Everytime a popup window closes, to get back to the main window, Selenium executes a selectWindow method with argument = mainframe. This works fine in Selenium IDE rerun on firefox, but almost always fails in Selenium RC with perl script with the following message -

# ERROR: could not find window mainFrame
# Failed test 'select_window, mainFrame'
# at pa_sa_item_dis_PO_40.pl line 102.

Review of Selenium document on select_window() reveals the following -
"...
1.) if windowID is null, (or the string "null") then it is assumed the user is referring to the original window instantiated by the browser).
..."


Making the simple change to the method from select_window_ok("mainframe") to select_window_ok() did the trick!

-V.

No comments: