Skip to content

Commit 08f1877

Browse files
authored
Update README.md
1 parent 3f2b4d8 commit 08f1877

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

README.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,28 @@ The idea behind the project is to make testers life easier by enabling them to c
1111

1212
##### Selenium WebDriver version 4+ support starts from version 1.6
1313

14-
Supported features:
14+
*Temporary workaround for Selenium v4+ in case of using `RemoteWebDriverBuilder`*
15+
16+
Instead of:
17+
18+
`
19+
WebDriver driver = RemoteWebDriver.builder().address("http://gridurl:4444").addAlternative(new ChromeOptions()).build();
20+
`
21+
22+
use
23+
24+
```
25+
URL remoteAddress = new URL("http://gridurl:4444/wd/hub");
26+
Tracer tracer = OpenTelemetryTracer.getInstance();
27+
ClientConfig config = ClientConfig.defaultConfig().baseUrl(remoteAddress);
28+
CommandExecutor executor = new HttpCommandExecutor(Collections.emptyMap(), config, new TracedHttpClient.Factory(tracer, org.openqa.selenium.remote.http.HttpClient.Factory.createDefault()));
29+
CommandExecutor executorTraced = new TracedCommandExecutor(executor, tracer);
30+
WebDriver webDriver = new RemoteWebDriver(executorTraced, new ChromeOptions());
31+
```
32+
33+
The reasoning is described in https://github.com/assertthat/selenium-shutterbug/issues/103
34+
35+
#### Supported features:
1536

1637
- Capturing the entire page
1738
- Screenshot comparison (with diff highlighting)

0 commit comments

Comments
 (0)