php-webdriver/php-webdriver

MSEdge is multiplatform, but DesiredCapabilities requires Windows

Aberta

#1.076 aberto em 27 de set. de 2023

 (0 comentário) (0 reação) (0 responsável)PHP (893 forks)batch import
bughelp wanted

Métricas do repositório

Stars
 (4.943 estrelas)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

Bug description

https://github.com/php-webdriver/php-webdriver/blob/a1578689290055586f1ee51eaf0ec9d52895bb6d/lib/Remote/DesiredCapabilities.php#L346

I believe the value should be ANY (like Firefox's or Chrome's), not WINDOWS since MSEdge also runs on OSX (and I guess Linux too).

I found this problem while running the mink driver testsuite on selenium/standalone-edge docker image. Changing the line above to ANY made it work.

(ironically, I got this problem while running on Windows, since I'm not using Windows docker containers and it's therefore considered as Linux)

How could the issue be reproduced

  1. Run the aforementioned docker image.
  2. Use DesiredCapabilities::micrsoftEdge()
  3. Note that it won't connect
  4. Use DesiredCapabilities::micrsoftEdge()->setCapability(WebDriverCapabilityType::PLATFORM, WebDriverPlatform::ANY);
  5. It will now connect and work as expected

Expected behavior

No response

Php-webdriver version

1.15.0

PHP version

8.1

How do you start the browser driver or Selenium server

selenium/standalone-edge

Selenium server / Selenium Docker image version

4

Browser driver (chromedriver/geckodriver...) version

117

Browser name and version

edge 117

Operating system

Docker Desktop on Windows

Additional context

No response

Guia do colaborador