Selenium Manager - WARN message

Hi there,
using selenium==4.22.0 but checked also with selenium==4.28.0, RF=7

For some reasons I need to use Selenium Manager in Offline mode(SE_OFFLINE), but even so it is giving the annoying(chromedriver is in the PATH but .cache/selenium is cleared):

[ WARN ] Exception managing chrome: Unable to discover proper chromedriver version in offline mode

Wanted to totally switch off SE Manager, I was able to do it with direct poinitng to chromedriver in browser instantiation KW.

${chrome_service}= Evaluate sys.modules[‘selenium.webdriver’].ChromeService(r"C:\driver\chromedriver.exe") sys

Create Webdriver Chrome options=${options}
… service=${chrome_service}

as executable_path seems to be deprecated(it is now in Service class), is there any other option to switch off Se Manager?

I would say I have not completely figured out SE Manager myself but a couple thoughts. It seems if you specify both the browser and driver executables then it appears to do less checking and more accepting your setup. It seems to do better when one specifies both browser (options) and driver (service) executables and seems unable to properly match when you provide just driver info. Finally you can turn on SE Manager debugging with the env variable, SE_DEBUG=true. As you are running this in the script and not SE Manager as a standalone executable you may need to also set robot loglevel to TRACE.

We just ran a section about SE Manager in our Advanced SeleniumLibrary workshop and your question here is giving me some good ideas for further instruction, explanations, and internal tests … so thanks for asking!

1 Like

Yeah, forgot to add, we have also somehting like this in our setup or KW opening browser:

${options}= Evaluate sys.modules[‘selenium.webdriver’].ChromeOptions() sys

and
${options.binary_location}= Set Variable $CHROME_BINARY_PATH

So using specific chrome+driver in this case.

While my issue was not exactly the same, i sort of reported this same (eg, there’s no way to bypass SM fully); [🐛 Bug]: selenium-manager hangs when trying to use selenium against electron app · Issue #13919 · SeleniumHQ/selenium · GitHub

But it got closed …

From python itslef(lib level) it is easy, as here:

But I don’t want to mess with library. Would like to switch it off completely with e.g. enviromental variable, the same putting it in offline mode:

Set Environment Variable SE_OFFLINE true

Can u please tell me where to set SE_OFFLINE as true ?
image

Set env variable →
Set Environment Variable SE_OFFLINE true
Before opening browser.

even after setting the environmental variable SE_OFFLINE to true. the latest stable test version of chrome browser is downloading in cache and opening the from there

is there any possible way to avoid that

Try “true” not True:

Set Environment Variable SE_OFFLINE true

Checked with Create Driver and Open Browser KWs and for me it is working like this.