Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Selenoid Sample KeyError: 'sessionId' #10

Open
mario-s opened this issue Nov 11, 2022 · 0 comments
Open

[BUG]: Selenoid Sample KeyError: 'sessionId' #10

mario-s opened this issue Nov 11, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@mario-s
Copy link

mario-s commented Nov 11, 2022

Describe the bug

When I use the docker-compose.yaml for the selenoid. I get an error in my Python script. I tested it with Chrome and Firefox. However the script works with the docker-compose-selenium-grid.yaml

Python Version: 3.9.13
Selenium Version: 4.6.0

How to reproduce the issue

Use following script and save it in issue.py:

from selenium import webdriver
from selenium.webdriver.common.by import By

options = webdriver.FirefoxOptions()
driver = webdriver.Remote(command_executor="http://localhost:8085", options=options)

driver.get("https://mdn.github.io/web-components-examples/life-cycle-callbacks/")
btn = driver.find_element(By.XPATH, '//button[contains(@class, "add")]')
print(btn)

Then execute:
docker pull selenoid/vnc:firefox_101.0
docker-compose up
python issue.py



### Logs appeared during using Healenium

```shell
HLM-selenoid:

2022/11/11 15:23:11 [-] [INIT] [Loading configuration files...]
2022/11/11 15:23:11 [-] [INIT] [Loaded configuration from /etc/selenoid/browsers.json]
2022/11/11 15:23:11 [-] [INIT] [Video Dir: /opt/selenoid/video]
2022/11/11 15:23:11 [-] [INIT] [Your Docker API version is 1.41]
2022/11/11 15:23:11 [-] [INIT] [Timezone: UTC]
2022/11/11 15:23:11 [-] [INIT] [Listening on :4444]
2022/11/11 15:26:03 [-] [INIT] [Loading configuration files...]
2022/11/11 15:26:03 [-] [INIT] [Loaded configuration from /etc/selenoid/browsers.json]
2022/11/11 15:26:03 [-] [INIT] [Video Dir: /opt/selenoid/video]
2022/11/11 15:26:03 [-] [INIT] [Your Docker API version is 1.41]
2022/11/11 15:26:03 [-] [INIT] [Timezone: UTC]
2022/11/11 15:26:03 [-] [INIT] [Listening on :4444]
2022/11/11 15:26:53 [-] [NEW_REQUEST] [unknown] [172.18.0.6]
2022/11/11 15:26:53 [-] [NEW_REQUEST_ACCEPTED] [unknown] [172.18.0.6]
2022/11/11 15:26:53 [0] [LOCATING_SERVICE] [firefox] []
2022/11/11 15:26:53 [-] [DEFAULT_VERSION] [Using default version: 106.0]
2022/11/11 15:26:53 [0] [ENVIRONMENT_NOT_AVAILABLE] [firefox] []

Expected behavior

An Webelemnt to interact with.

Similar like this: <selenium.webdriver.remote.webelement.WebElement (session="0ec15e53-edf1-455a-bcf7-2f1295170b68", element="df0193aa-ca85-4900-a05f-0a98322de74e")>

Actual behavior

  File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 288, in __init__
    self.start_session(capabilities, browser_profile)
  File "/usr/local/lib/python3.9/site-packages/selenium/webdriver/remote/webdriver.py", line 384, in start_session
    self.session_id = response["sessionId"]
KeyError: 'sessionId'

Healenium Proxy version

1.1.0

Healenium Backend version

3.2.4

Selenium version

4.6.0

Additional context

No response

@mario-s mario-s added the bug Something isn't working label Nov 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants