Search in sources :

Example 16 with TextFieldElement

use of com.seleniumtests.uipage.htmlelements.TextFieldElement in project seleniumRobot by bhecquet.

the class TestByC method testFindElementByPartialAttribute.

// test attribute "*" syntax
@Test(groups = { "it" })
public void testFindElementByPartialAttribute() {
    new TextFieldElement("", ByC.attribute("attr*", "ttribut")).sendKeys("element found by attribute");
    Assert.assertEquals(DriverTestPage.textSelectedId.getValue(), "element found by attribute");
}
Also used : TextFieldElement(com.seleniumtests.uipage.htmlelements.TextFieldElement) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 17 with TextFieldElement

use of com.seleniumtests.uipage.htmlelements.TextFieldElement in project seleniumRobot by bhecquet.

the class TestByC method testFindElementBySeveralCriteriaNothingFound.

@Test(groups = { "it" }, expectedExceptions = NoSuchElementException.class)
public void testFindElementBySeveralCriteriaNothingFound() {
    SeleniumTestsContextManager.getThreadContext().setReplayTimeout(7);
    new TextFieldElement("", ByC.and(By.tagName("input"), By.name("noElement"))).getTagName();
}
Also used : TextFieldElement(com.seleniumtests.uipage.htmlelements.TextFieldElement) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 18 with TextFieldElement

use of com.seleniumtests.uipage.htmlelements.TextFieldElement in project seleniumRobot by bhecquet.

the class TestByC method testFindElementByCustomPartialLabelForward.

@Test(groups = { "it" })
public void testFindElementByCustomPartialLabelForward() {
    new TextFieldElement("", ByC.partialLabelForward("Test sele", "input", "h3")).sendKeys("element found by partial h3 tag");
    Assert.assertEquals(DriverTestPage.textSelectedId.getValue(), "element found by partial h3 tag");
}
Also used : TextFieldElement(com.seleniumtests.uipage.htmlelements.TextFieldElement) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 19 with TextFieldElement

use of com.seleniumtests.uipage.htmlelements.TextFieldElement in project seleniumRobot by bhecquet.

the class TestByC method testFindElementByAttributeStartingWith.

// test attribute "^" syntax"
@Test(groups = { "it" })
public void testFindElementByAttributeStartingWith() {
    new TextFieldElement("", ByC.attribute("attr^", "attribu")).sendKeys("element found by attribute");
    Assert.assertEquals(DriverTestPage.textSelectedId.getValue(), "element found by attribute");
}
Also used : TextFieldElement(com.seleniumtests.uipage.htmlelements.TextFieldElement) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 20 with TextFieldElement

use of com.seleniumtests.uipage.htmlelements.TextFieldElement in project seleniumRobot by bhecquet.

the class TestByC method testFindElementByPartialLabelForward.

@Test(groups = { "it" })
public void testFindElementByPartialLabelForward() {
    new TextFieldElement("", ByC.partialLabelForward("By id for", "input")).sendKeys("element found by partial label");
    Assert.assertEquals(DriverTestPage.textSelectedId.getValue(), "element found by partial label");
}
Also used : TextFieldElement(com.seleniumtests.uipage.htmlelements.TextFieldElement) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Aggregations

TextFieldElement (com.seleniumtests.uipage.htmlelements.TextFieldElement)26 Test (org.testng.annotations.Test)25 GenericTest (com.seleniumtests.GenericTest)20 PrepareForTest (org.powermock.core.classloader.annotations.PrepareForTest)5 GenericDriverTest (com.seleniumtests.GenericDriverTest)3 BrowserType (com.seleniumtests.driver.BrowserType)3 CustomEventFiringWebDriver (com.seleniumtests.driver.CustomEventFiringWebDriver)3 ReporterTest (com.seleniumtests.it.reporter.ReporterTest)3 ArrayList (java.util.ArrayList)3 List (java.util.List)3 WebDriver (org.openqa.selenium.WebDriver)3 MockitoTest (com.seleniumtests.MockitoTest)2 WebElement (org.openqa.selenium.WebElement)2 RemoteWebElement (org.openqa.selenium.remote.RemoteWebElement)2 FrameElement (com.seleniumtests.uipage.htmlelements.FrameElement)1 SkipException (org.testng.SkipException)1