robotcodedev / robotcode

RobotFramework support for Visual Studio Code
https://robotcode.io
Apache License 2.0
168 stars 13 forks source link

Web driver version issue #171

Closed fhz158 closed 8 months ago

fhz158 commented 9 months ago

I created a virtual environment using anaconda to install the robot framework and associated it with vscode. In the virtual environment, I placed the corresponding version of the driver for my Google browser in E:\anaconda\envs\robot\Scripts. However, there is another version of Python in my computer system and a different version of the web driver in its Scripts folder. When I run the case using robotcode in vscode, it called the web driver in the computer system instead of the web driver in my virtual environment. Is there any place to set the default path for calling web drivers?

1698400037271

d-biehl commented 9 months ago

Sorry, this is more of a SeleniumLibrary question. RobotCode has no SeleniumLibrary specific settings. Maybe you should ask the question in the Slack channel.

According to SeleniumLibrary documentation, the webdriver is found via the $PATH variable. This is a system variable and I think your scripts directory is not in the path. You can also specify a path in the Open Browser keyword, please check the documentation.

You can also look in the documentation of the Selenium library, there is also a WebDriver manager and I'm not sure right now, the latest versions of Selenium come with their own drivers.