aerokube / windows-images

Step by step instructions for building Docker images with Windows
Apache License 2.0
221 stars 44 forks source link

"session not created: No matching capabilities found" when using "platformName": "windows" #45

Closed iamumairayub closed 1 year ago

iamumairayub commented 1 year ago
from selenium import webdriver
from selenium.webdriver import ChromeOptions

capabilities = {
    "browserName": "chrome",
    "browserVersion": "117.0",
    "platformName": 'windows',
    "selenoid:options": {
        "enableVNC": True,
        "enableVideo": False
    },
}

driver = webdriver.Remote(
    command_executor="http://my-server:4444/wd/hub",
    desired_capabilities=capabilities)

driver.get('https://www.whatismybrowser.com/')

But is shows error

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: No matching capabilities found

If I remove platformName then it works fine.

Selenoid server is running/started using CM on my Linux server.

./cm_linux_amd64 selenoid start

Further information.

Python 3.10.7
selenium == 4.4.3
iamumairayub commented 1 year ago

sorry, wrong repo.