List of usage examples for org.openqa.selenium By partialLinkText
public static By partialLinkText(String partialLinkText)
From source file:com.epam.jdi.uitests.mobile.appium.elements.pageobjects.annotations.AppiumAnnotationsUtil.java
License:Open Source License
public static By getFrame(Frame frame) { if (frame == null) return null; if (!"".equals(frame.id())) return By.id(frame.id()); if (!"".equals(frame.className())) return By.className(frame.className()); if (!"".equals(frame.xpath())) return By.xpath(frame.xpath()); if (!"".equals(frame.css())) return By.cssSelector(frame.css()); if (!"".equals(frame.linkText())) return By.linkText(frame.linkText()); if (!"".equals(frame.name())) return By.name(frame.name()); if (!"".equals(frame.partialLinkText())) return By.partialLinkText(frame.partialLinkText()); if (!"".equals(frame.tagName())) return By.tagName(frame.tagName()); return null;//from w ww . j a v a 2 s .c o m }
From source file:com.epam.jdi.uitests.mobile.appium.elements.pageobjects.annotations.AppiumAnnotationsUtil.java
License:Open Source License
public static By findByToBy(FindBy locator) { if (locator == null) return null; if (!"".equals(locator.id())) return By.id(locator.id()); if (!"".equals(locator.className())) return By.className(locator.className()); if (!"".equals(locator.xpath())) return By.xpath(locator.xpath()); if (!"".equals(locator.css())) return By.cssSelector(locator.css()); if (!"".equals(locator.linkText())) return By.linkText(locator.linkText()); if (!"".equals(locator.name())) return By.name(locator.name()); if (!"".equals(locator.partialLinkText())) return By.partialLinkText(locator.partialLinkText()); if (!"".equals(locator.tagName())) return By.tagName(locator.tagName()); return null;// www.j a va2s . c o m }
From source file:com.epam.jdi.uitests.mobile.appium.elements.pageobjects.annotations.AppiumAnnotationsUtil.java
License:Open Source License
public static By getFindByLocator(JFindBy locator) { if (locator == null) return null; if (!"".equals(locator.id())) return By.id(locator.id()); if (!"".equals(locator.className())) return By.className(locator.className()); if (!"".equals(locator.xpath())) return By.xpath(locator.xpath()); if (!"".equals(locator.css())) return By.cssSelector(locator.css()); if (!"".equals(locator.linkText())) return By.linkText(locator.linkText()); if (!"".equals(locator.name())) return By.name(locator.name()); if (!"".equals(locator.partialLinkText())) return By.partialLinkText(locator.partialLinkText()); if (!"".equals(locator.tagName())) return By.tagName(locator.tagName()); return null;/*from ww w . j a v a 2s . c o m*/ }
From source file:com.epam.jdi.uitests.mobile.appium.elements.pageobjects.annotations.WebAnnotationsUtil.java
License:Open Source License
public static By findByToBy(JFindBy locator) { if (locator == null) return null; if (!"".equals(locator.id())) return By.id(locator.id()); if (!"".equals(locator.className())) return By.className(locator.className()); if (!"".equals(locator.xpath())) return By.xpath(locator.xpath()); if (!"".equals(locator.css())) return By.cssSelector(locator.css()); if (!"".equals(locator.linkText())) return By.linkText(locator.linkText()); if (!"".equals(locator.name())) return By.name(locator.name()); if (!"".equals(locator.partialLinkText())) return By.partialLinkText(locator.partialLinkText()); if (!"".equals(locator.tagName())) return By.tagName(locator.tagName()); return null;// w w w . ja va2s .c o m }
From source file:com.epam.jdi.uitests.web.selenium.elements.pageobjects.annotations.WebAnnotationsUtil.java
License:Open Source License
public static By findByToBy(FindBy locator) { if (locator == null) return null; if (!locator.id().isEmpty()) return By.id(locator.id()); if (!locator.className().isEmpty()) return By.className(locator.className()); if (!locator.xpath().isEmpty()) return By.xpath(locator.xpath()); if (!locator.css().isEmpty()) return By.cssSelector(locator.css()); if (!locator.linkText().isEmpty()) return By.linkText(locator.linkText()); if (!locator.name().isEmpty()) return By.name(locator.name()); if (!locator.partialLinkText().isEmpty()) return By.partialLinkText(locator.partialLinkText()); if (!locator.tagName().isEmpty()) return By.tagName(locator.tagName()); return null;// w w w . j a v a2 s .c om }
From source file:com.epam.jdi.uitests.web.selenium.elements.pageobjects.annotations.WebAnnotationsUtil.java
License:Open Source License
public static By findByToBy(JFindBy locator) { if (locator == null) return null; if (!"".equals(locator.xpath())) return By.xpath(locator.xpath()); if (!"".equals(locator.css())) return By.cssSelector(locator.css()); if (!"".equals(locator.linkText())) return By.linkText(locator.linkText()); if (!"".equals(locator.partialLinkText())) return By.partialLinkText(locator.partialLinkText()); if (!"".equals(locator.tagName())) return By.tagName(locator.tagName()); if (!"".equals(locator.text())) return By.xpath(".//*/text()[normalize-space(.) = " + Quotes.escape(locator.text()) + "]/parent::*"); if (!"".equals(locator.attribute().name())) return getAttribute(locator.attribute().name(), locator.attribute().value()); if (!"".equals(locator.id())) return By.id(locator.id()); if (!"".equals(locator.className())) return By.className(locator.className()); if (!"".equals(locator.name())) return By.name(locator.name()); if (!"".equals(locator.value())) return getAttribute("value", locator.value()); if (!"".equals(locator.title())) return getAttribute("title", locator.title()); if (!"".equals(locator.type())) return getAttribute("type", locator.title()); if (!"".equals(locator.model())) return getAttribute("ng-model", locator.model()); if (!"".equals(locator.binding())) return getAttribute("ng-binding", locator.binding()); if (!"".equals(locator.repeat())) return getAttribute("ng-repeat", locator.repeat()); return null;/*w w w. ja v a 2 s.c o m*/ }
From source file:com.evolveum.midpoint.schrodinger.component.common.Search.java
License:Apache License
public Popover<Search<T>> byName() { getParentElement().$(By.partialLinkText("Name:")).waitUntil(Condition.appears, MidPoint.TIMEOUT_DEFAULT) .click();//from ww w .j ava 2 s . com ElementsCollection popoverElements = getParentElement().$$(Schrodinger.byDataId("popover")); SelenideElement popover = null; for (SelenideElement popoverElement : popoverElements) { if (popoverElement.isDisplayed()) { popover = popoverElement; break; } popover = popoverElement; } return new Popover<>(this, popover); }
From source file:com.example.selenium.find.elements.FindElementsTest.java
@Test public void findByPartialLinkTest() { try {/* w w w . ja va 2 s . c om*/ WebElement element = selenium.findElement(By.partialLinkText("Log")); Assert.assertNotNull(element); } catch (NoSuchElementException ex) { Logger.getLogger(FindElementsTest.class.getName()).log(Level.SEVERE, null, ex); } }
From source file:com.ggasoftware.jdiuitest.web.selenium.elements.pageobjects.annotations.WebAnnotationsUtil.java
License:Open Source License
public static By getFindByLocator(FindBy locator) { if (locator == null) return null; if (!"".equals(locator.id())) return By.id(locator.id()); if (!"".equals(locator.className())) return By.className(locator.className()); if (!"".equals(locator.xpath())) return By.xpath(locator.xpath()); if (!"".equals(locator.css())) return By.cssSelector(locator.css()); if (!"".equals(locator.linkText())) return By.linkText(locator.linkText()); if (!"".equals(locator.name())) return By.name(locator.name()); if (!"".equals(locator.partialLinkText())) return By.partialLinkText(locator.partialLinkText()); if (!"".equals(locator.tagName())) return By.tagName(locator.tagName()); return null;/*from ww w.j ava 2 s . co m*/ }
From source file:com.github.lucasgueiros.whist.partida.PartidaWebIT.java
@Test public void testJogoContraMaquinas() { driver.get(baseUrl + "/ifuwhist/"); driver.findElement(By.linkText("Entrar")).click(); driver.findElement(By.id("oform:oLoginField")).clear(); driver.findElement(By.id("oform:oLoginField")).sendKeys("usuario1"); driver.findElement(By.id("oform:oSenhaField")).clear(); driver.findElement(By.id("oform:oSenhaField")).sendKeys("123"); driver.findElement(By.partialLinkText("Criar mesa")).click(); driver.findElement(By.id("formulario:campoNome")).clear(); driver.findElement(By.id("formulario:campoNome")).sendKeys("sala"); driver.findElement(By.partialLinkText("Um contra maquinas")).click(); driver.findElement(By.partialLinkText("Entrar em uma sala")).click(); driver.findElement(By.partialLinkText("Entrar")).click(); driver.findElement(By.partialLinkText("Eu quero jogar")).click(); driver.findElement(By.partialLinkText("Comecar a jogar")).click(); }