Get help with testing, discuss unit testing strategies etc.


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!

Post by mats »

It's for multiple popup scenario (or iframes). Not to separate browsers, or individual browser instances.

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...

Post by mats »

How do you open your new window? Can you please provide a clear test case?

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.

Post by nickolay »

Actually seems it does accept url and title. Please provide more details.

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
(231.44 KiB) Downloaded 202 times

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"?

Post Reply