Obtain session id of existing chrome session
Moderators: JRL, Dorian (MJT support)
Obtain session id of existing chrome session
Hi. Is this possible? I need to click a chrome element in an existing session that has been automatically generated by a third party app. The url is unpredictable so I can’t use the chromestart function unfortunately
- Dorian (MJT support)
- Automation Wizard
- Posts: 1414
- Joined: Sun Nov 03, 2002 3:19 am
Re: Obtain session id of existing chrome session
No, I'm afraid there isn't. These functions require that ChromeDriver is running and that ChromeDriver starts the Chrome browser session.
That said though, we could focus Chrome, copy the URL, and start another Chrome session. I'm not sure how viable that workaround is for you.
That said though, we could focus Chrome, copy the URL, and start another Chrome session. I'm not sure how viable that workaround is for you.
Code: Select all
//Edit this
Let>CHROMEDRIVER_EXE=c:\chromedriver.exe
//Focus Chrome
SetFocus>Obtain session*
WaitWindowFocused>Obtain session*
Wait>0.1
//Select the URL bar
Press alt
send>d
Release alt
Wait>0.1
//Copy it and assign it as a variable
Press ctrl
send>c
Release ctrl
Wait>0.1
getclipboard>TheURL
//Start and navigate Chrome
ChromeStart>session_id
ChromeNavigate>session_id,url,%TheURL%
Re: Obtain session id of existing chrome session
Alright, thanks for the quick reply