We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 66b1882 commit 7aa9a5bCopy full SHA for 7aa9a5b
1 file changed
src/main/java/testUI/Utils/By.java
@@ -4,12 +4,13 @@
4
import testUI.Configuration;
5
6
import static testUI.TestUIDriver.getDriver;
7
+import static testUI.TestUIDriver.getDrivers;
8
9
public class By {
10
11
public static org.openqa.selenium.By byText(String text) {
12
if (!Configuration.automationType.equals(Configuration.DESKTOP_PLATFORM))
- if (!getDriver().isBrowser())
13
+ if (getDrivers().size() != 0 && !getDriver().isBrowser())
14
return org.openqa.selenium.By.xpath("//*[contains(@text,'" + text + "')]");
15
return Selectors.byText(text);
16
}
0 commit comments