htmlunit-driver icon indicating copy to clipboard operation
htmlunit-driver copied to clipboard

Use Capabilities API to set options

Open sbabcoc opened this issue 1 year ago • 3 comments
trafficstars

User description

Instead of using the importOptions method to duplicate every option, set the individual options directly via the Capabilities API.


PR Type

Enhancement


Description

  • Replaced the use of WebClientOptions with HtmlUnitDriverOptions for setting up the WebDriver.
  • Set individual options directly via the HtmlUnitOption capabilities API.
  • Removed the importOptions method to streamline option setting.

Changes walkthrough 📝

Relevant files
Enhancement
WebDriverTestCase.java
Use Capabilities API for setting HtmlUnitDriver options   

src/test/java/org/openqa/selenium/htmlunit/WebDriverTestCase.java

  • Replaced WebClientOptions with HtmlUnitDriverOptions.
  • Set individual options directly using HtmlUnitOption capabilities.
  • Removed the use of importOptions method.
  • +8/-10   

    💡 PR-Agent usage: Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    sbabcoc avatar Jun 30 '24 18:06 sbabcoc