Quality Testing

Quality is delighting customers

Hi friends,


My project is been integrated with facebook. So while using selenium i need to capture the window id of the facebook login pop up. 


Hope the command to be used is @selenium.wait_for_pop_up(window id, time)


For this please let me know how to get the window id....

Am i clear with the requirement? Any idea on this...

Please share your answers...



Thanks in advance...




Views: 359

Reply to This

Replies to This Discussion

Hey Suffering with the same issue :)


Please provide if any one is having solution for this...



I think you can use selenium.selectwindow(window ID). try recording in IDE, you will get the window ID.




Yep, we will get the window id while recording, But for every time the window id will be randomly generated.

So kindly suggest me on how to fetch the randomly generated id for a pop up.




For such Dynamically changing id's, one of the following can be used:

                * xpath

                * Regular Expressions


Thanks & Regards,


if you are using rc ,then try using methods getwindowIds or getWindowNames .If it doesnt work try ,selenium.openurl directly
for dynamically changing popups declare a variable and store the dynamic values in to the variable and get the length of the variable by this u can get the no of windows currently there by using the length value u can select the currently opened popup and u can handle it


TTWT Magazine





© 2022   Created by Quality Testing.   Powered by

Badges  |  Report an Issue  |  Terms of Service