How to select the popup windows which have no name, no title, and no id

188 views
Skip to first unread message

Grrison

unread,
Sep 7, 2009, 4:52:07 AM9/7/09
to selenium-users...@googlegroups.com
hay guys,

I got a problem when I use the Selenium RC Java client to develop the test scripts.

the Scenario is when I click a button, there will be a popup windows, I need to fill in data in that popup windows.

So I tried to move the focus to the popup windows. but .....

I used the selenium.getAllWindowNames(), selenium.getAllWindowsIds() and selenium.getAllWindowsTitles()

and tried to print them in the console to see the popup windows identification. I got nothing.

Even there is only the main windows info.

So I do not know how to move the focus to the popup windows.

And I looked into the javascript which open the popup windows.

it is

{code:html}window.showModalDialog(servletPath + "/change_pwd.jsp?random=" + random, window, "dialogHeight:280px; dialogWidth:430px; status:no; help:no; center:yes");{code}

using the showModalDialog to open the popup windows.

So , how can I select the popup windows?

Thanks in advance

Grrison

Grrison

unread,
Sep 7, 2009, 7:52:35 AM9/7/09
to selenium-users...@googlegroups.com
Hi Kumar,

Thanks for your information.
But, I used the selenium.getAllWindowNames, Ids, and titles to see the identification.
But I got nothing.

So I cannot use the selenium.selectWindow("name=pop up window name"); because I don’t the popup window name~

:(

Best Regards
Grrison
MP: 13681762930

Grrison

unread,
Sep 14, 2009, 2:21:12 AM9/14/09
to selenium-users...@googlegroups.com
Thanks.
I have tried using Selenium IDE to record my steps. But... I found, when I clicked the button, and entered the text in the popup window, The Selenium IDE does not record command like "selenium.selectwindow(XXXX)", it just recorded the selenium.type(locator,"Text").
But after I click the 'Close' button in the popup windows and try to verify the text in the main window, the selenium IDE recorded selenium.selectWindow("name=null"). So I was so confused.

Reply all
Reply to author
Forward
0 new messages