Hi,
I’ve create a robot that do a click activityin a main webpage then a new window is opened and I would like to get the url of the new window,but the robot the url of the main window.
You cannot use the get URL activity in classic version activities. So, here the attach browser won’t work. remove the attach browser and place the get URL activity with use browser or application activity and please do the necessary changes so that you can get the URL.
Change the below settings as:
Close ----------- NAppCloseMode.Never
Input Mode --------- Simulate
Open ----------- NAppOpenMode.IfNotOpen
Window attach mode --------- single window
I have given a workflow in that the use browser/application should be passed with first url and the click activity will be done and the second page will be opened. So then the get URL will extract the URL of the new page loaded.
After the click activity on the main webpage, use the “Attach Browser” activity to target the newly opened window. To do this, click on the “Indicate window on screen” button and select the new window that appears after the click.
Once the new window is attached, use the “Get Attribute” activity inside the “Attach Browser” container. Set the following properties for the “Get Attribute” activity:
Selector: Leave it empty. Since you’re already attached to the new browser window, you don’t need to specify a selector here.
Attribute: Select “url” from the dropdown list. This will retrieve the URL of the newly opened window.
Create a variable (let’s call it newWindowURL) to store the URL retrieved from the “Get Attribute” activity.
To get the URL, use an Assign activity to assign the value to the newWindowURL variable. The value can be obtained using the Get Attribute output property called “result”. So, in the Assign: newWindowURL = Get Attribute's output result