cancel
Showing results for 
Search instead for 
Did you mean: 

transfer control to new window

SOLVED
Highlighted
New Contributor

transfer control to new window

Hello,

 

I am using Python functions as my container language and this contains javascript Statements which are  executed when a "Run Script Routine" is called from a keyword test. The Problem i am facing is as floowos:

 

I click a button on page A, which opens up a new window(Page B). How can i transfer control from page A to page B so that all the "Run Script routine" after the button click are executed on page B and not Page A.

 

Please find the attached ScreenShot of my function that i am using to click. Any help would be appreciated. 

Capture18.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

Re: transfer control to new window

Hi,

 

To transfer the control you must reference the relevant page.

So, assuming that page B has URL like this: http://www.yoursite.com/app/approvePage.html

you must replace

Sys.Browser("*").Page("*").<...>

with something like

Sys.Browser("*").Page("*/approvePage*").<...>

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
2 REPLIES 2
Community Hero

Re: transfer control to new window

Hi,

 

To transfer the control you must reference the relevant page.

So, assuming that page B has URL like this: http://www.yoursite.com/app/approvePage.html

you must replace

Sys.Browser("*").Page("*").<...>

with something like

Sys.Browser("*").Page("*/approvePage*").<...>

 

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Postings made by [Community Expert Group] members
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
New Contributor

Re: transfer control to new window

Thank you for the answer. It works as expected.

New Here?
Join us and watch the welcome video:
Top Kudoed Authors