List of usage examples for org.openqa.selenium By partialLinkText
public static By partialLinkText(String partialLinkText)
From source file:org.auraframework.integration.test.components.ui.tabset.TabsetUITest.java
License:Apache License
/** * Test that will verify that tabbing through tabset should go into the body. * /*from w ww .j a v a2 s . c om*/ * Disabled against mobile since tabbing does not make sense on mobile Tabbing with Safari acts oddly. For some * strange reason, I have to grab the element I want and then send the tab key to put it into focus other wise * nothing happens */ @ExcludeBrowsers({ BrowserType.SAFARI, BrowserType.ANDROID_PHONE, BrowserType.ANDROID_TABLET, BrowserType.IPHONE, BrowserType.IPAD }) @Test public void testTabbingInTabSet() throws Exception { open(createURL("tab", "true")); // Focus on tab and move to next focusable element WebElement element = findDomElement(By.partialLinkText("Accounts")); element.click(); getAuraUITestingUtil().pressTab(element); // Verify anchor is focused on String activeElementText = getAuraUITestingUtil().getActiveElementText(); assertTrue("Focus is not on ther correct element", activeElementText.contains("Close")); // Move from anchor to next item (inputTextBox) element = findDomElement(By.xpath(createXPath(1) + "/a")); getAuraUITestingUtil().pressTab(element); // Verify inputTextBox (in tab section) is focused verifyElementFocus("inputTabTitle"); // Tab to the next focusable area element = findDomElement(By.cssSelector("input[class*='inputTabTitle']")); getAuraUITestingUtil().pressTab(element); // Verify inputTextArea (outside of the tab) is focused verifyElementFocus("inputTabContent"); }
From source file:org.bigtester.ate.model.page.elementfind.ElementFindByPartialLinkText.java
License:Apache License
/** * {@inheritDoc}/*from www . ja va 2 s. c om*/ */ @Override public WebElement doFind(IMyWebDriver myWebDriver, final String findByValue) { final By findBy = By.partialLinkText(findByValue); if (null == findBy) throw GlobalUtils.createInternalError("selenium By creation"); return findElement(findBy, myWebDriver); // // WebDriver webD = myWebDriver.getWebDriver(); // if (null == webD) { // throw new IllegalStateException( // "web driver is not correctly populated."); // } else { // createWait(webD); // // WebElement retValWE = getWait().until( //NOPMD // new Function<WebDriver, WebElement>() { // public @Nullable WebElement apply( //NOPMD // @Nullable WebDriver driver) { // if (null == driver) { // throw new IllegalStateException( // "webdriver is not correctly populated."); // } else { // return driver.findElement(By.partialLinkText(findByValue)); // } // } // }); // if (null == retValWE) { // throw new NoSuchElementException(findByValue); // } else { // return retValWE; // } // } }
From source file:org.callimachusproject.webdriver.pages.DocEditor.java
License:Apache License
public DocEditor heading1() { browser.focusInFrameIndex(0);/* w w w .j a v a2 s . c o m*/ browser.click(By.cssSelector(".cke_combo__format a.cke_combo_button")); browser.focusInFrameIndex(0, 1); browser.click(By.partialLinkText("Heading 1")); return this; }
From source file:org.eclipse.che.selenium.pageobject.dashboard.DashboardFactories.java
License:Open Source License
/** click on current factory id Url */ public void clickFactoryIDUrl() { waitFactoryIdUrl();/*www . j a v a2s . c o m*/ loadPageTimeoutWait.until(visibilityOfElementLocated(By.partialLinkText(ideUrl + "f?id="))).click(); }
From source file:org.eclipse.che.selenium.pageobject.dashboard.DashboardFactories.java
License:Open Source License
/** wait factory id url after creation a factory */ public void waitFactoryIdUrl() { loadPageTimeoutWait.until(visibilityOfElementLocated(By.partialLinkText(ideUrl + "f?id="))); }
From source file:org.eclipse.che.selenium.pageobject.dashboard.DashboardFactories.java
License:Open Source License
/** wait id factory url after creation a factory */ public void waitFactoryNamedUrl(String factoryName) { loadPageTimeoutWait.until(visibilityOfElementLocated(By.partialLinkText(ideUrl + "f?name=" + factoryName))); }
From source file:org.eclipse.che.selenium.pageobject.dashboard.DashboardFactory.java
License:Open Source License
/** wait any factory url after creation a factory */ public void waitFactoryUrl() { new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.partialLinkText(ideUrl + "f?id="))); }
From source file:org.eclipse.che.selenium.pageobject.dashboard.DashboardFactory.java
License:Open Source License
/** click on current factory id Url */ public void clickFactoryIDUrl() { waitFactoryUrl();/*from ww w . j a v a2 s . c o m*/ new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.partialLinkText(ideUrl + "f?id="))).click(); }
From source file:org.eclipse.che.selenium.pageobject.dashboard.DashboardFactory.java
License:Open Source License
/** click on current factory id Url */ public void clickNamedFactoryUrl() { waitFactoryUrl();/*from ww w. j av a 2s .c o m*/ new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.partialLinkText(ideUrl + "f?name="))) .click(); }
From source file:org.eclipse.che.selenium.pageobject.dashboard.DashboardFactory.java
License:Open Source License
/** click on current factory id Url */ public void clickFactoryNamedUrl() { waitFactoryUrl();//from w w w . j ava 2 s . co m new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.partialLinkText(ideUrl + "f?name="))) .click(); }