How to use switchTo method in Siesta to handle multiple brow

Get help with testing, discuss unit testing strategies etc.
Post Reply
User avatar
nayila
Posts: 7
Joined: Thu Apr 12, 2018 10:33 pm

How to use switchTo method in Siesta to handle multiple brow

Post by nayila » Fri Apr 13, 2018 5:19 am

How to use switchTo method in Siesta to handle multiple browser in Siesta.

I found "switchTo" from Siesta API, but for the argument, I tried my new browser URL or title, but none of them was working. Any suggestion? Any code example?

Thank you!

User avatar
mats
Core Developer
Core Developer
Posts: 15330
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: How to use switchTo method in Siesta to handle multiple

Post by mats » Fri Apr 13, 2018 12:35 pm

It's for multiple popup scenario (or iframes). Not to separate browsers, or individual browser instances.
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
nayila
Posts: 7
Joined: Thu Apr 12, 2018 10:33 pm

Re: How to use switchTo method in Siesta to handle multiple

Post by nayila » Fri Apr 13, 2018 5:04 pm

Yes, that was what I meant. I click the link, and now window popup will show up. How do you switch you control form current to the new one by using switchTo(), title and url of new popup seem not working for me...

User avatar
mats
Core Developer
Core Developer
Posts: 15330
Joined: Sat Dec 19, 2009 11:41 pm
Location: Sweden
Contact:

Re: How to use switchTo method in Siesta to handle multiple

Post by mats » Sun Apr 15, 2018 10:19 am

How do you open your new window? Can you please provide a clear test case?
Tired of debugging javascript errors in web applications? Try our new error logging service RootCause, or read more on the Sencha blog

@bryntum
Facebook
API documentation

User avatar
nickolay
Core Developer
Core Developer
Posts: 3382
Joined: Mon May 16, 2011 10:48 am

Re: How to use switchTo method in Siesta to handle multiple

Post by nickolay » Mon Apr 16, 2018 1:27 pm

"switchTo" requires the popup handle, not the url or title: https://www.bryntum.com/docs/siesta/#!/ ... d-switchTo

Popup handle is the value returned from the "window.open()", it is basically a "window" object of the popup.
We offer training in both Ext JS and our products, read more here.
Read the API documentation

User avatar
nickolay
Core Developer
Core Developer
Posts: 3382
Joined: Mon May 16, 2011 10:48 am

Re: How to use switchTo method in Siesta to handle multiple

Post by nickolay » Mon Apr 16, 2018 1:35 pm

Actually seems it does accept url and title. Please provide more details.
We offer training in both Ext JS and our products, read more here.
Read the API documentation

User avatar
nayila
Posts: 7
Joined: Thu Apr 12, 2018 10:33 pm

Re: How to use switchTo method in Siesta to handle multiple brow

Post by nayila » Tue Jul 23, 2019 6:34 pm

Hey, I have attached my test step,
so, I want to verify the content in the preview window,
so how do I move from the original window to the new window and verify the content?
Thank you!
Attachments
testStep.docx
(232.19 KiB) Downloaded 14 times

User avatar
nickolay
Core Developer
Core Developer
Posts: 3382
Joined: Mon May 16, 2011 10:48 am

Re: How to use switchTo method in Siesta to handle multiple brow

Post by nickolay » Fri Jul 26, 2019 9:33 am

Hi,

Still need more details. What is the url of the popup? How exactly you call the "switchTo"? And what exactly does not work after you call "switchTo"?
We offer training in both Ext JS and our products, read more here.
Read the API documentation

Post Reply