Hi DB,
If you want to open the URL link in a new tab the <a href=.....> tag should have an attribute target = "_blank".
If the attribute is missing then you have two ways:
- Change the HTML code and add the attribute target = "_blank" to the <a> tag.
- Use webInjectJavaScript:
webNavigate --url "[your page]"
webInjectJavaScript --script "var links = document.getElementsByTagName(\'a\');\r\nvar len = links.length;\r\n\r\nfor(var i=0; i<len; i++)\r\n{\r\n links[i].target = \"_blank\";\r\n}"
webClick --selector "CssSelector" --css "body > a"
I hope this will help you to resolve the issue.
Regards,
------------------------------
Stanislav Terziev
------------------------------
Original Message:
Sent: Thu August 03, 2023 01:44 AM
From: Durga Bhavani Uppuluru
Subject: How to open url in a new tab in the existing browser instance with IBM RPA web automation
Dear All,
Greetings to you!
I'm trying to open URL in a new tab on the same browser window that has the user login context.
Recorder did not capture the sequence of opening the url in a new tab.
As a result, the generated script tries to open the url in the same tab and that fails.
Kindly share your suggestions on how can it be accomplished with IBM RPA.
Thanks in advance for your suggestions.
Best Regards,
DB
------------------------------
Durga Bhavani Uppuluru
------------------------------