Re: Using Regular Expression with Selenium IDE

118 views
Skip to first unread message

Dima Kovalenko

unread,
Mar 30, 2009, 3:19:57 PM3/30/09
to selenium-users...@googlegroups.com
why don't you try to select the window by "name" or "title"?

Hoping that those would stay more consistant.

you can find more info about using the selectWindow command in the reference tab for the command in the ide

http://i41.tinypic.com/10cw70y.jpg

Mary Ann

unread,
Mar 30, 2009, 5:30:56 PM3/30/09
to selenium-users...@googlegroups.com
{quote}The modified version of this code using regular expression. This code dies not work. Can anyone explain why?
<tr>\\ &nbsp;&nbsp;&nbsp; <td>waitForPopUp</td>\\ &nbsp;&nbsp;&nbsp; <td>regexp:win(\d+)</td>\\ &nbsp;&nbsp;&nbsp; <td>30000</td>\\ </tr>{quote}

Because the first argument required by *waitForPopUp* is a *windowID*, not a *pattern*.&nbsp; We cannot (unfortunately!) just stick a *regexp:* prefix followed by a regular expression wherever it might come in useful--only when the command in question allows a pattern.

You might try to determine the name of the JavaScript variable (in the web page) that is set to the window ID before the window is opened.&nbsp; One can access such variables from JavaScript code within an IDE test.&nbsp; If you want to go with this approach and can find this variable's name, let me know which version of SIDE you're running and I can send you the code to use it.

--mam-p

Scal

unread,
Apr 2, 2009, 7:14:01 AM4/2/09
to selenium-users...@googlegroups.com
Mary Ann; can you share the code and specify for which SIDE it's meant to be used?
I'm interested and maybe others will be when reading this message.

Thanks

Scal

unread,
Apr 4, 2009, 9:53:07 AM4/4/09
to selenium-users...@googlegroups.com
Thanks for sharing {emoticon:__jive_emoticon_name=happy}

Reply all
Reply to author
Forward
0 new messages