Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to open a new tab in same browser using robot frame work

As far as I know there is no straight keyword to open new tab in selenium2library. I have seen the below code which opens a new tab in IE(default browser)for the given URL

webbrowser.open_new_tab(url)

But I want to write a keyword which opens a new tab on current running browser (it may be any browser).

like image 540
PKR Avatar asked Jan 15 '23 13:01

PKR


1 Answers

You can try

Execute Javascript    window.open('')
Get Window Titles
Select Window    title=undefined
Go To   ${URL}

This Code helps to Open New tab in the same browser and collect the Windows Title of all tabs in same browser. Based on the Window Title name , it identifies the Newly opened tab and launch the URL

like image 68
nithya a Avatar answered Jan 29 '23 20:01

nithya a