Robotframework: Create Webdriver reports bluetooth_adapter_winrt.cc error - selenium-chromedriver

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.

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).

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.

Related

Why am I unable to install/search pygame package using Anaconda Navigator?

I have made environments on Anaconda Navigator with python 3.6 and 3.8 which I am using as interpreter in a project using PyCharm but I am unable to install/search the Pygame package on the Anaconda Navigator for these environments.
I have installed the package but I could not find anything on why I cannot install it using Anaconda Navigator!
No one is consistently building that package for Conda. There was an attempt to build it on Conda Forge, but it appears abandoned after it never successfully compiled for any platform. If you want a Conda version, drop a package request on the conda-forge/staged-recipes Issue queue.
For now, create a new environment, then install it via pip. Or use a YAML, like:
pygame.yaml
name: pygame
channels:
- conda-forge
dependencies:
- python=3.8 # or whatever version you like
- pip
- pip:
- pygame
shell session
## create environment
conda env create -f pygame.yaml
The package is provides wheels for most platforms, so should be a simple install. Otherwise, you may also need something like the conda-forge::compilers package.

"use chrome headless mode" in chrome driver config in jmeter not working

Hello I tried to run chrome headless browser in jmeter but its not working.
Please check screenshot for error logenter image description here.
I cannot reproduce your issue using the following software:
JMeter 5.0
ChromeDriver 2.43.600210 (68dcf5eebde37173d4027fa8635e332711d2874a)
WebDriver Sampler 3.0
So my expectation is that your setup is somehow corrupt, i.e. you have Selenium Java dependencies not matching the WebDriver Sampler version. Consider reinstalling clean JMeter 5.0 and get the latest WebDriver Sampler using JMeter Plugins Manager

Setup Mono 3.0.1 in MonoDevelop 2.8 on Windows

I have installed MonoDevelop 2.8.2 using the windows .Net runtimes for now. I would like to use the latest Mono binaries (3.0.1) instead. To achieve that I´ve installed Mono 3.0.1 for windows from here
I´ve added the runtime in MonoDevelop via Tools->Options->Preferences->.NET Runtimes so that it shows up correctly in the list and set it as default. I made sure that my project uses this runtime (Project->Active Runtime->Mono 3.0.1). When I build a simple console project now I get the following error:
Build failed.The specified executable is not a valid application for
this OS platform.
Can anybody shed some light whats going wrong here?

Running Chrome WebDriver on a linux server with no display

I'd like to run automated tests using selenium2's chrome webdriver on a linux server.
I've already set up firefox to run on the server by using Xvfb (See http://www.semicomplete.com/blog/geekery/xvfb-firefox.html) and would like to do something similar with chrome. Is this possible?
I was facing the same challenge of setting a linux box with selenium + chromedriver,
and here's my notes:
Pre-reqs:
Install JRE to run the selenium jar
Install the selenium server
grab the jar file from https://code.google.com/p/selenium/downloads/list)
Install xvfb (you've seem to have already achieved this part)
Install google-chrome for your linux distribution
Download the chrome driver
You can grab it from here: https://sites.google.com/a/chromium.org/chromedriver/downloads
Install other selenium dependencies that you might need (but the above is the minimum to get chromedriver to work)
To run:
Run xvfb
Xvfb :1 -screen 5 1024x768x8 &
export DISPLAY=:1.5
Run the selenium server jar with ChromeDriver options.
It'll look something like this:
java -jar selenium-server-standalone-2.30.0.jar -Dwebdriver.chrome.bin=/path/to/google-chrome -Dwebdriver.chrome.driver=/path/to/chromedriver
The selenium server log should output something similar to this:
Mar 19, 2013 10:07:27 AM org.openqa.grid.selenium.GridLauncher main
INFO: Launching a standalone server
Setting system property webdriver.chrome.bin to {location of google-chrome}
Setting system property webdriver.chrome.driver to {location of chromedriver}
10:07:34.258 INFO - RemoteWebDriver instances should connect to: http://127.0.0.1:4444/wd/hub
10:07:34.259 INFO - Version Jetty/5.1.x
10:07:34.259 INFO - Started HttpContext[/selenium-server/driver,/selenium-server/driver]
...
Reference:
http://www.yann.com/en/use-xvfb-selenium-and-chrome-to-drive-a-web-browser-in-php-23/08/2012.html
Cheers!
According to SetEnvironmentProperty to ChromeDriver programatically you can do the following:
service = new ChromeDriverService.Builder()
.usingChromeDriverExecutable(new File("/path/to/chromedriver"))
.usingAnyFreePort()
.withEnvironment(ImmutableMap.of("DISPLAY",":20"))
.build();
Here is the documentation for withEnvironment
I haven't been able to find a way to do this programmatically for the ChromeDriver like you can with the FirefoxBinary.
I've submitted a improvement request which has a patch attached to allow this. You can see it here: http://code.google.com/p/selenium/issues/detail?id=2673
Edit:
You can see below response from Stephen on how to use this now the change has been merged.: https://stackoverflow.com/a/16619608/998442
I get what you are trying to do, but you probably just run selenium grid. It was made for automated browser testing. Works great on a server.
https://www.selenium.dev/documentation/en/grid/

How to build a PyObjC project on Mac OS X 10.6, that runs 10.5?

I have a PyObjC project that I build on Mac OS X 10.6 with XCode 3.2 and I'm not able to run on 10.5.
All I'm using is the official PyObjC project templates to create an empty project (that simply opens a window). Then I build the app and copy it over to 10.5. But the app always crashes on 10.5:
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException',
reason: '/Users/hupf/Development/PyHelloWorld/main.m:44 main() PyRun_SimpleFile failed
with file '/Users/hupf/Desktop/PyHelloWorld.app/Contents/Resources/main.py'. See
console for errors.'
What can I do to make it run on 10.5 too? Why is there still this path /Users/hupf/Development/ I only have on my 10.6 machine?
Greetings,
hupf
P.S. I've also installed Python through MacPorts on my 10.6 machine... might this be a problem?
I don't know anything about PyObjC but your project is using Xcode then you just need to set your project's deployment target to the oldest OS version you want your app to run on. (FYI: The SDK version defines the newest version of the OS you app will run on.) Note also that any API's added after the deployment target version will be weak-linked meaning that if you're running on the older OS where those API's don't exist they will be nil; if you call them you will crash. (so you should always check them for != nil before calling them).
Again, this isn't necessarily an PyObjC answer; YMMV…