Skip to content

Commit

Permalink
add chrome argument to overcome robot protection
Browse files Browse the repository at this point in the history
"--disable-blink-features=AutomationControlled"
  • Loading branch information
asolntsev committed Sep 1, 2024
1 parent 2f1d350 commit ea50a67
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/test/java/org/selenide/examples/cucumber/TextReport.java
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
package org.selenide.examples.cucumber;

import org.openqa.selenium.chrome.ChromeOptions;

import com.codeborne.selenide.Configuration;
import com.codeborne.selenide.logevents.SimpleReport;
import io.cucumber.java.After;
import io.cucumber.java.Before;
import io.cucumber.java.BeforeAll;
import io.cucumber.java.Scenario;

public class TextReport {
private final SimpleReport report = new SimpleReport();

@BeforeAll
public static void beforeAllTests() {
Configuration.browserCapabilities = new ChromeOptions()
.addArguments("--disable-blink-features=AutomationControlled");
}

@Before
public void beforeTest(Scenario scenario) {
scenario.log("Starting " + scenario.getName());
Expand Down

0 comments on commit ea50a67

Please sign in to comment.