Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

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

View previous topic View next topic Go down

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

Post by Latha.p 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.

Latha.p
Active particpant
Active particpant

Posts : 11
Join date : 2013-01-06

Back to top Go down

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

Post by adityac 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

Back to top Go down

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

Post by adityac on Fri Feb 01, 2013 3:35 pm

u can use selectWindow command...if u want 2 come back to ur first window

adityac
Professional
Professional

Posts : 101
Join date : 2013-01-17

Back to top Go down

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

Post by Latha.p 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

Back to top Go down

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

Post by Latha.p on Fri Feb 01, 2013 4:00 pm

I did the sample choosing some website.
can u plz tell me the mistake in that?

Latha.p
Active particpant
Active particpant

Posts : 11
Join date : 2013-01-06

Back to top Go down

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

Post by adityac on Fri Feb 01, 2013 4:07 pm

new window is opening for u??? after clicking on css=a[title="SriRamaTech@YouTube"] > img?

adityac
Professional
Professional

Posts : 101
Join date : 2013-01-17

Back to top Go down

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

Post by Latha.p 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?

Latha.p
Active particpant
Active particpant

Posts : 11
Join date : 2013-01-06

Back to top Go down

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

Post by adityac 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

adityac
Professional
Professional

Posts : 101
Join date : 2013-01-17

Back to top Go down

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

Post by Latha.p 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?

Latha.p
Active particpant
Active particpant

Posts : 11
Join date : 2013-01-06

Back to top Go down

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

Post by adityac 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

adityac
Professional
Professional

Posts : 101
Join date : 2013-01-17

Back to top Go down

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

Post by Sponsored content Today at 1:09 am


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

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