Skip to content

Fixed problem with isIE #142

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/main/java/ru/alfabank/steps/BaseMethods.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,15 @@
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import static com.codeborne.selenide.Browsers.IE;
import static com.codeborne.selenide.Browsers.INTERNET_EXPLORER;
import static com.codeborne.selenide.WebDriverRunner.getWebDriver;
import static com.codeborne.selenide.WebDriverRunner.isIE;
import static io.restassured.RestAssured.given;
import static java.util.Objects.isNull;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.jupiter.api.Assertions.fail;
import static ru.alfabank.alfatest.cucumber.ScopedVariables.resolveVars;
import static ru.alfabank.tests.core.drivers.CustomDriverProvider.BROWSER;
import static ru.alfabank.tests.core.helpers.PropertyLoader.*;

/**
Expand Down Expand Up @@ -328,4 +330,9 @@ public void checkPageTitle(String pageTitleName) {
assertThat(String.format("Заголовок страницы не совпадает с ожидаемым значением. Ожидаемый результат: %s, текущий результат: %s", pageTitleName, currentTitle),
pageTitleName, IsEqualIgnoringCase.equalToIgnoringCase(currentTitle));
}

public boolean isIE(){
String currentBrowser = loadSystemPropertyOrDefault(BROWSER, "");
return currentBrowser.equalsIgnoreCase(IE) || currentBrowser.equalsIgnoreCase(INTERNET_EXPLORER);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
import java.util.stream.Collectors;

import static com.codeborne.selenide.Selenide.$$;
import static com.codeborne.selenide.WebDriverRunner.isIE;
import static com.codeborne.selenide.WebDriverRunner.url;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsStringIgnoringCase;
Expand Down