Search in sources :

Example 21 with TextFieldElement

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

the class TestByC method testFindElementsBySeveralCriteriaNothingFound.

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

Example 22 with TextFieldElement

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

the class TestByC method testFindElementByLabelForwardWithoutTagName.

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

Example 23 with TextFieldElement

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

the class TestByC method testFindElementByPartialCustomLabelBackward.

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

Example 24 with TextFieldElement

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

the class TestByC method testFindElementByLabelBackward.

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

Example 25 with TextFieldElement

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

the class TestByC method testFindElementByByLabelBackwardStarting.

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