简体   繁体   中英

RSelenium extraCapabilities Error, can't open browser with profile

I can succesfully open a chrome browser with below code

rs_driver_object <- rsDriver(browser="chrome", chromever="102.0.5005.61", port = free_port() )

But when I try to open it with a profile , it opens 3 new windows with that profile and gives below error

cprof <- getChromeProfile(
    "C:\\Users\\USERNAME\\AppData\\Local\\Google\\Chrome\\User Data\\",
    "Profile 1"
)

rs_driver_object <- rsDriver(browser="chrome", chromever="102.0.5005.61", port = free_port(), extraCapabilities = cprof)

Error:

Build info: version: '4.0.0-alpha-2', revision: 'f148142cf8', time: '2019-07-01T21:30:10'
System info: host: 'LAPTOP-blahblah', ip: '192.168.0.70', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_333'
Driver info: driver.version: unknown

Could not open chrome browser.
Client error message:
     Summary: SessionNotCreatedException
     Detail: A new session could not be created.
     Further Details: run errorDetails method
Check server log for further details.

I have even removed the needed browser extension from the profile, yet no luck. (So it doesn't work even though there's not any single browser extension.) I have also closed all other chrome windows, but the problem persists.

What can I do right now ?
Is there a way to read the error log and understand why it happens ?

Solved!

Turn off below setup in chrome settings:
chrome://settings/system >>
" Continue running background apps when Google Chrome is closed "

So, anyone having SessionNotCreatedException error can simply try turning off this setup, it may work as it happened in my case.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM