Robotframework: Create Webdriver reports bluetooth_adapter_winrt.cc error

835 Views Asked by At

We have developed some tests using a Robotframework Ride 1.7.4 / Python 2.7 environment, and tests are running correctly.

We have now created a new environment using Robotframework ride v2.0b1 / Python 3.8.4 and the following commands are no longer working as expected.

Both environments use robotframework 3.2.1

${options}=    Create Dictionary    binary=C:/path_to_application/application_name.exe
${caps}=    Create Dictionary    chromeOptions=${options}
Create Webdriver    Chrome    desired_capabilities=${caps}

[Arguments]    ${url}
${options}=    Create Dictionary    androidPackage=com.android.chrome
${caps}=    Create Dictionary    chromeOptions=${options}
Create Webdriver    Chrome    desired_capabilities=${caps}

We are trying to test "applications" using robotframework .

Instead of starting application_name.exe (in the case of windows app ) or an emulated android client (in the case of android package) we get a chrome browser appearing (for error message see below)

Partial list of libraries we have installed (new environment)

robotframework                  3.2.1
robotframework-appiumlibrary    1.5.0.6
robotframework-archivelibrary   0.4.0
robotframework-autoitlibrary    1.2.5
robotframework-difflibrary      0.1.0
robotframework-eyes             1.3.3
robotframework-lint             1.1
robotframework-pabot            1.8.0
robotframework-ride             2.0b1
robotframework-selenium2library 3.0.0
robotframework-seleniumlibrary  4.4.0
robotframeworklexer             1.1
robotremoteserver               1.1
selenium                        3.141.0
setuptools                      41.2.0
six                             1.15.0
soupsieve                       2.0.1
tqdm                            4.47.0
urllib3                         1.25.9
webdriver-manager               3.2.1
webdrivermanager                0.8.0
Werkzeug                        1.0.1
wheel                           0.34.2
wxPython                        4.0.7.post2

chromedriver.exe is the latest version (for Chrome 84)

I have tried using older versions of chromedriver, but this has not fixed the problem.

Libraries used in the "working" environment

robotframework                  3.2.1
robotframework-archivelibrary   0.4.0
robotframework-databaselibrary  1.2
robotframework-difflibrary      0.1.0
robotframework-eyes             0.64
robotframework-lint             0.9
robotframework-pabot            0.44
robotframework-ride             1.7.4.2
robotframework-selenium2library 3.0.0
robotframework-seleniumlibrary  4.4.0
robotframeworklexer             1.1
robotremoteserver               1.1
selenium                        3.141.0
setuptools                      20.10.1
six                             1.12.0
urllib3                         1.25.10
Werkzeug                        0.15.0
wxPython                        4.0.4

Thanks

Gwyn

I have simplified things, and just run a few lines of .robot code from the command line robot test.robot (test.robot contains above lines and selenium library reference)

The new environment shows the following error

DevTools listening on ws://127.0.0.1:56934/devtools/browser/426cb694-b5e1-4cc7-ad64-1f47db368449
.[10456:14676:0723/141008.354:ERROR:device_event_log_impl.cc(208)] [14:10:08.358] Bluetooth: bluetooth_adapter_winrt.cc:1074 Getting Default Adapter failed.
Launch Windows NativeApp                                              | FAIL |
Element 'logo' did not appear in 15 seconds.
2

There are 2 best solutions below

0
On

Original question was mixing up version of Robot Framework IDE (RIDE), with what it seemed to be the version of the framework itself.

The problem you want to solve, is that a Robot Framework test suite script was working in a Python 2.7 configuration, and now it does not, in a Python 3.8 configuration.

You need to make sure, your configuration in Python 2.7 is still working, and take note of the versions of libraries installed there. Then do the same but on Python 3.8 (you already shown those).

This confirmation is independent of the IDE or Editor you use to edit the test suite script. Just focus on running it from the command window/prompt/terminal/shell.

RIDE 1.7.4.2 can be used to run Robot Framework installed either in Python 2.7 or 3.8.

The same happens with RIDE 2.0b1 installed on Python 3.8, it can run Robot Framework installed either in Python 2.7 or 3.8. It all depends on what Robot Framework installation is found first in the PATH environment variable. Or on other words, the actual robot when you open a command window/prompt/terminal/shell and issue the command, for example: robot --version.

Other thing you mention is Appium not working with the style of command you used. The option binary is meant to pass to Webdriver the path of chromedriver or other webdriver like, for example operadriver. I never saw that use to start an mobile phone App. Looks like chromedriver, just ignored the binary option (because it does not need it).

0
On

Resolved by ensuring we only had chromedriver v37 in our path in the "new" environment. Later versions of Chromedriver (I tried v79, and v84) don't work.