florentbr/SeleniumBasic

Cannot use the chrome browser in the opened browser

dileepachathuranga opened this issue · 2 comments

Need to run the script in the current open browser. This because when there is new browser start, it requires to enter username and password every time to login to a website. Can you please provide a solution to open in same window/new tab.

Gby3 commented

Theres no built in function in seleniumbasic to open a new tab (that i know) but you can use the javascript executor to open a new tab or a window in the same instance
driver.executescript("window.open")

You will need to handle the different tabs or windows in order to have control over them...

Hope it helps!

If the browser was opened using
objSelenium.AddArgument "--remote-debugging-port={debugport}"
you may try with
objSelenium.SetPreference "debuggerAddress", "localhost:{debugport}"

At least this is the way it works in Python.