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

Update Selenium.WebDriver from 4.26.1 to 4.27.0 fails getting capabilities as string (net) #801

Closed
javiertuya opened this issue Dec 3, 2024 · 2 comments
Assignees

Comments

@javiertuya
Copy link
Owner

Several tests in TestDriver fail, e.g.

SelemaTest -> /home/runner/work/selema/selema/net/SelemaTest/bin/Debug/net8.0/SelemaTest.dll
Test run for /home/runner/work/selema/selema/net/SelemaTest/bin/Debug/net8.0/SelemaTest.dll (.NETCoreApp,Version=v8.0)
VSTest version [17](https://github.com/javiertuya/selema/actions/runs/12079130163/job/33745103820?pr=797#step:11:18).11.1 (x64)

Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
  Failed TestHeadlessWebDriverDefault [389 ms]
  Error Message:
     Assert.That(actual, Is.EqualTo(expected))
  Expected string length 84 but was 36. Strings differ at index 0.
  Expected: "{browserName:chrome,goog:chromeOptions:{args:[--headless,--re..."
  But was:  "OpenQA.Selenium.Chrome.ChromeOptions"
  -----------^

  Stack Trace:
     at NUnit.Framework.Legacy.ClassicAssert.AreEqual(Object expected, Object actual)
   at Test4giis.Selema.Core.TestDriver.AssertOptions(SeleniumDriverFactory factory, String expected) in /home/runner/work/selema/selema/net/SelemaTest/Translated/Test4giis.Selema.Core/TestDriver.cs:line [18](https://github.com/javiertuya/selema/actions/runs/12079130163/job/33745103820?pr=797#step:11:19)0
   at Test4giis.Selema.Core.TestDriver.TestHeadlessWebDriverDefault() in /home/runner/work/selema/selema/net/SelemaTest/Translated/Test4giis.Selema.Core/TestDriver.cs:line 101
@javiertuya javiertuya self-assigned this Dec 3, 2024
@javiertuya
Copy link
Owner Author

The custom ToString method in DriverOptions has been removed in v4.27.0 (net): SeleniumHQ/selenium#14736.
A similar method has to be added to the tests (or compare the object content)

@javiertuya
Copy link
Owner Author

Implemented in 3d8f4f7: As many attributes in the DriverOptions object, the custom ToString generates includes only the browser name and the arguments (only for chromium)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant