Share
Go down
Latha.p
Active particpant
Active particpant
Posts : 11
Join date : 2013-01-06

Asserting text in the window which is opened in the new tab using SeleniumIDE

on Fri Feb 01, 2013 1:52 pm
Hi,





My
requirement is as follows


1.
I click on image link.


2.
It opens the page in the new tab.


3.
I want to assert text present in that page.


4.
And i want to come back to the page which has
that image link.






Can any one help me please.


Is window focus works for this or is there any alternative to achieve
this? How can achieve my requirement?


I tried that but it is asking the window name, or id linke that......


How can we find the window name or id?


Thanks
in advance.
adityac
Professional
Professional
Posts : 101
Join date : 2013-01-17

Re: Asserting text in the window which is opened in the new tab using SeleniumIDE

on Fri Feb 01, 2013 3:26 pm
u can find window title of window using firebug...in header section of html code title will be available...
adityac
Professional
Professional
Posts : 101
Join date : 2013-01-17

Re: Asserting text in the window which is opened in the new tab using SeleniumIDE

on Fri Feb 01, 2013 3:35 pm
u can use selectWindow command...if u want 2 come back to ur first window
Latha.p
Active particpant
Active particpant
Posts : 11
Join date : 2013-01-06

Re: Asserting text in the window which is opened in the new tab using SeleniumIDE

on Fri Feb 01, 2013 3:56 pm
Thank u adityac for ur reply.

I tried that but iam getting error as "Could not find window with title SriRamaTech - YouTube"

Following is the HTML code







New Test





































New Test
open http://www.sriramatech.com/
click css=a[title="SriRamaTech@YouTube"] > img
selectWindow SriRamaTech - YouTube
assertText css=span.qualified-channel-title SriRamaTech
selectWindow null
assertText css=span.header-headertitle Welcome to ORKL SriRamaTech Enterprises!

Latha.p
Active particpant
Active particpant
Posts : 11
Join date : 2013-01-06

Re: Asserting text in the window which is opened in the new tab using SeleniumIDE

on Fri Feb 01, 2013 4:00 pm
I did the sample choosing some website.
can u plz tell me the mistake in that?
adityac
Professional
Professional
Posts : 101
Join date : 2013-01-17

Re: Asserting text in the window which is opened in the new tab using SeleniumIDE

on Fri Feb 01, 2013 4:07 pm
new window is opening for u??? after clicking on css=a[title="SriRamaTech@YouTube"] > img?
Latha.p
Active particpant
Active particpant
Posts : 11
Join date : 2013-01-06

Re: Asserting text in the window which is opened in the new tab using SeleniumIDE

on Fri Feb 01, 2013 4:11 pm
No it opened in new tab.
Is there any cmd to assert text in page which is opened in new tab?
adityac
Professional
Professional
Posts : 101
Join date : 2013-01-17

Re: Asserting text in the window which is opened in the new tab using SeleniumIDE

on Fri Feb 01, 2013 6:53 pm
http://stackoverflow.com/questions/11358316/selenium-web-driver-open-new-tab-instead-of-a-new-window

check this link... opening in new window is possble bt no idea of tab Sad
Latha.p
Active particpant
Active particpant
Posts : 11
Join date : 2013-01-06

Re: Asserting text in the window which is opened in the new tab using SeleniumIDE

on Sat Feb 02, 2013 10:54 am
k adityac no problem. Thank u very much for ur reply.
Aditya can u send me one practical example on handling multiple windows?

I saw one blog that code which we have written to handle multiple windows did not playback in IDE but the same thing works in webdriver.

Is it possible to handle in IDE?

And can u tell me how can we find windowid, windowname.... which is used in selectWindow command?
adityac
Professional
Professional
Posts : 101
Join date : 2013-01-17

Re: Asserting text in the window which is opened in the new tab using SeleniumIDE

on Tue Feb 05, 2013 1:42 pm
u cn try same scenario by disabling tab in FF....

using firebug u cn find window id... it will be in header section of html code
Sponsored content

Re: Asserting text in the window which is opened in the new tab using SeleniumIDE

Back to top
Permissions in this forum:
You cannot reply to topics in this forum