question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Getting Canopy to work with Selenium Hub locally

See original GitHub issue

This is not an issue with how Canopy needing to be fixed. It is an issue with me not knowing what I am doing and also not knowing where to post questions about canopy other than here. I apologize for the length, I just want to get more info out there

I upgraded to version 1.5.1 of canopy (the minimum version to get chrome headless to work). For some reason I get errors when upgrading to 1.6 and I don’t know enough about F# to debug it.

I have a unit test in F# canopy that works great when I have “start chrome” as well as when I have “start ChromeHeadless”, but when I use this code to have it work in selenium hub:

let capability = new DesiredCapabilities()
capability.SetCapability("browser", "chrome")
        
// Setup Remote WebDriver to run on Selenium Hub
let remote = Remote("http://localhost:4444/wd/hub/", capability)

start remote

it kicks off this in my selenium hub command prompt:

12:15:09.159 INFO [RequestHandler.process] - Got a request to create a new session: Capabilities {browser: chrome}

12:15:09.170 INFO [TestSlot.getNewSession] - Trying to create a new session on test slot {server:CONFIG_UUID=97a96575-c281-41e8-a330-acf076e12e95, seleniumProtocol=WebDriver, browserName=chrome, maxInstances=5, platformName=WIN10, platform=WIN10}

and then nothing happens that I can see in the grid.

In case I did something wrong when setting up the grid the two commands I used were:

java -jar selenium-server-standalone.jar -role hub

in one browser and this in another

java -jar selenium-server-standalone.jar -role node -hub http://localhost:4444/grid/register

I can go to the grid console and see the browser icons like I am supposed to, so I assume its set up right.

I get the following error with my unit test in Visual Studio.

Message: Class Initialization method TestName.DetailTests+UnitTest.Setup threw exception. System.InvalidOperationException: System.InvalidOperationException: Unable to create session from org.openqa.selenium.remote.NewSessionPayload@11d55a1 Build info: version: ‘3.11.0’, revision: ‘e59cfb3’, time: ‘2018-03-11T20:33:15.31Z’

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:12 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
av2012commented, Dec 9, 2018

You need to specify browserName instead of browser let capability = new OpenQA.Selenium.Remote.DesiredCapabilities() capability.SetCapability(“browserName”, “firefox”) I also had this issue, but when modified to browserName it started to work.

0reactions
manishdubecommented, Aug 10, 2020

Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Getting Canopy to work with Selenium Hub locally
Coming soon: A brand new website interface for an even better experience!
Read more >
c# - Selenium Grid and local runs
I have a grid hub running with some nodes, the grid URL is stored in a c# project App.Config file. My App.Config also...
Read more >
Selenium Grid Tutorial : Learn Basics & How to Set It Up
To get started with Selenium Grid, it is essential to have Java already installed, and set up the environment variables. Step 2: Start...
Read more >
Selenium Grid Tutorial: Setup a Hub and Node (Example)
To design test scripts that will run on the grid, we need to use DesiredCapabilites and the RemoteWebDriver objects. DesiredCapabilites is used ...
Read more >
Getting started with Selenium Grid
Develop or debug tests using RemoteWebDriver locally; Running quick test suites before pushing code; Have a easy to setup Grid in a CI/CD...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found