use of com.seleniumtests.uipage.htmlelements.TextFieldElement in project seleniumRobot by bhecquet.
the class TestWebUiDriver method testAttachExternalChromeBrowser.
/**
* Check we can attach Selenium to a chrome process if it's launched with '--remote-debugging-port' option
*/
@Test(groups = { "it" })
public void testAttachExternalChromeBrowser() {
SeleniumTestsContextManager.getThreadContext().setTestType(TestType.WEB);
Map<BrowserType, List<BrowserInfo>> browsers = OSUtility.getInstalledBrowsersWithVersion();
String path = browsers.get(BrowserType.CHROME).get(0).getPath();
int port = GenericDriverTest.findFreePort();
// create chrome browser with the right option
new BrowserLauncher(BrowserType.CHROME, port, path, 0, null).run();
// creates the driver
WebDriver driver1 = WebUIDriver.getWebDriver(true, BrowserType.CHROME, "main", port);
driver1.get("chrome://settings/");
Assert.assertTrue(new TextFieldElement("search", By.id("search")).isElementPresent(3));
}
use of com.seleniumtests.uipage.htmlelements.TextFieldElement in project seleniumRobot by bhecquet.
the class TestFrameElement method testTextFieldElementInsideFrame.
@Test(groups = { "ut" })
public void testTextFieldElementInsideFrame() throws Exception {
FrameElement frame = new FrameElement("", By.id("frameId"));
TextFieldElement el = new TextFieldElement("", By.id("el"), frame);
el.sendKeys("toto");
verify(locator).frame(any(WebElement.class));
verify(locator).defaultContent();
}
use of com.seleniumtests.uipage.htmlelements.TextFieldElement in project seleniumRobot by bhecquet.
the class TestByC method testFindElementByByLabelBackwardEnding.
@Test(groups = { "it" })
public void testFindElementByByLabelBackwardEnding() {
new TextFieldElement("", ByC.labelBackward(" id backward$", "input")).sendKeys("element found by label backward$");
Assert.assertEquals(DriverTestPage.textSelectedText.getValue(), "element found by label backward$");
}
use of com.seleniumtests.uipage.htmlelements.TextFieldElement in project seleniumRobot by bhecquet.
the class TestByC method testFindElementByLabelForward.
public void testFindElementByLabelForward(String labelToSearch) {
new TextFieldElement("", ByC.labelForward(labelToSearch, "input")).sendKeys("element found by label");
Assert.assertEquals(DriverTestPage.textSelectedId.getValue(), "element found by label");
}
use of com.seleniumtests.uipage.htmlelements.TextFieldElement in project seleniumRobot by bhecquet.
the class TestByC method testFindElementByCustomLabelBackward.
@Test(groups = { "it" })
public void testFindElementByCustomLabelBackward() {
new TextFieldElement("", ByC.labelBackward("Test select Multiple", "input", "h3")).sendKeys("element found by h3 tag backward");
Assert.assertEquals(DriverTestPage.textSelectedText.getValue(), "element found by h3 tag backward");
}
Aggregations