Search in sources :

Example 6 with TextFieldElement

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

the class TestByC method testFindElementsBySeveralCriteriaNothingFound2.

@Test(groups = { "it" })
public void testFindElementsBySeveralCriteriaNothingFound2() {
    SeleniumTestsContextManager.getThreadContext().setReplayTimeout(7);
    Assert.assertEquals(new TextFieldElement("", ByC.and(By.tagName("noElement"), By.name("textField"))).findElements().size(), 0);
}
Also used : TextFieldElement(com.seleniumtests.uipage.htmlelements.TextFieldElement) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 7 with TextFieldElement

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

the class TestByC method testFindElementByCustomLabelForward.

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

Example 8 with TextFieldElement

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

the class TestByC method testFindElementBySeveralCriteria.

@Test(groups = { "it" })
public void testFindElementBySeveralCriteria() {
    TextFieldElement el = new TextFieldElement("", ByC.and(By.tagName("input"), By.name("textField")));
    Assert.assertEquals(el.getTagName(), "input");
    Assert.assertEquals(el.getAttribute("name"), "textField");
}
Also used : TextFieldElement(com.seleniumtests.uipage.htmlelements.TextFieldElement) Test(org.testng.annotations.Test) GenericTest(com.seleniumtests.GenericTest)

Example 9 with TextFieldElement

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

the class TestByC method testFindElementByAttributeEndingWith.

// test attribute "$" syntax"
@Test(groups = { "it" })
public void testFindElementByAttributeEndingWith() {
    new TextFieldElement("", ByC.attribute("attr$", "tribute")).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 10 with TextFieldElement

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

the class TestByC method testFindElementByLabelBackwardWithoutTagName.

@Test(groups = { "it" })
public void testFindElementByLabelBackwardWithoutTagName() {
    new TextFieldElement("", ByC.labelBackward("By id backward")).sendKeys("element found by label backward without tagname");
    Assert.assertEquals(DriverTestPage.textSelectedText.getValue(), "element found by label backward without tagname");
}
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