use of com.seleniumtests.uipage.htmlelements.TextFieldElement in project seleniumRobot by bhecquet.
the class TestByC method testFindElementByAttribute.
@Test(groups = { "it" })
public void testFindElementByAttribute() {
new TextFieldElement("", ByC.attribute("attr", "attribute")).sendKeys("element found by attribute");
Assert.assertEquals(DriverTestPage.textSelectedId.getValue(), "element found by attribute");
}
use of com.seleniumtests.uipage.htmlelements.TextFieldElement in project seleniumRobot by bhecquet.
the class TestWebUiDriver method testAttachExternalChromeBrowserStartingLate.
/**
* Be sure that we can still attach driver even if it takes a long time to start
* For chrome, max wait time is 1 minute
*/
@Test(groups = { "it" })
public void testAttachExternalChromeBrowserStartingLate() {
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();
logger.info("will start browser in 15 secs");
new BrowserLauncher(BrowserType.CHROME, port, path, 30, null).run();
logger.info("Waiting for driver");
// 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 TestWebUiDriver method testAttachExternalEdgeBrowser.
@Test(groups = { "it" })
public void testAttachExternalEdgeBrowser() {
if (!SystemUtils.IS_OS_WINDOWS) {
throw new SkipException("This test can only be done on Windows");
}
SeleniumTestsContextManager.getThreadContext().setTestType(TestType.WEB);
Map<BrowserType, List<BrowserInfo>> browsers = OSUtility.getInstalledBrowsersWithVersion();
String path = browsers.get(BrowserType.EDGE).get(0).getPath();
int port = GenericDriverTest.findFreePort();
// create chrome browser with the right option
new BrowserLauncher(BrowserType.EDGE, port, path, 0, null).run();
// creates the driver
WebDriver driver1 = WebUIDriver.getWebDriver(true, BrowserType.EDGE, "main", port);
driver1.get("edge://settings/");
Assert.assertTrue(new TextFieldElement("search", By.id("search_input")).isElementPresent(3));
}
use of com.seleniumtests.uipage.htmlelements.TextFieldElement in project seleniumRobot by bhecquet.
the class TestByC method testFindElementByPartialLabelBackward.
@Test(groups = { "it" })
public void testFindElementByPartialLabelBackward() {
new TextFieldElement("", ByC.partialLabelBackward("By id back", "input")).sendKeys("element found by partial label backward");
Assert.assertEquals(DriverTestPage.textSelectedText.getValue(), "element found by partial label backward");
}
use of com.seleniumtests.uipage.htmlelements.TextFieldElement in project seleniumRobot by bhecquet.
the class TestByC method testFindElementByByLabelBackwardContaining.
@Test(groups = { "it" })
public void testFindElementByByLabelBackwardContaining() {
new TextFieldElement("", ByC.labelBackward("y id back*", "input")).sendKeys("element found by label backward*");
Assert.assertEquals(DriverTestPage.textSelectedText.getValue(), "element found by label backward*");
}
Aggregations