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
Premium Member
Premium Member
Posts: 12
Joined: Thu Apr 12, 2018 10:33 pm

How to use switchTo method in Siesta to handle multiple brow

Post by nayila »

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: 16449
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 »

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
Premium Member
Premium Member
Posts: 12
Joined: Thu Apr 12, 2018 10:33 pm

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

Post by nayila »

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: 16449
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 »

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: 3459
Joined: Mon May 16, 2011 10:48 am

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

Post by nickolay »

"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: 3459
Joined: Mon May 16, 2011 10:48 am

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

Post by nickolay »

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
Premium Member
Premium Member
Posts: 12
Joined: Thu Apr 12, 2018 10:33 pm

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

Post by nayila »

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 42 times

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

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

Post by nickolay »

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