org.openqa.selenium.By.ByXPath Java Examples
The following examples show how to use
org.openqa.selenium.By.ByXPath.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: StringToSeleniumLocatorSetParameterConverterTests.java From vividus with Apache License 2.0 | 5 votes |
static Stream<Arguments> typeParameters() { return Stream.of( Arguments.of(SET_BY, true), Arguments.of(new TypeToken<HashSet<By>>() { } .getType(), false), Arguments.of(new TypeToken<TreeSet<By>>() { } .getType(), false), Arguments.of(new TypeToken<Set<ByXPath>>() { } .getType(), false), Arguments.of(new TypeToken<Set<String>>() { } .getType(), false), Arguments.of(new TypeToken<By>() { } .getType(), false), Arguments.of(new TypeToken<List<By>>() { } .getType(), false) ); }
Example #2
Source File: LocatorUtilTest.java From qaf with MIT License | 5 votes |
@DataProvider(name = "locatorDP") public static Iterator<Object[]> testData() { ArrayList<Object[]> data = new ArrayList<Object[]>(); data.add(new Object[]{"id=eleId", ById.class}); data.add(new Object[]{"name=eleName", ByName.class}); data.add(new Object[]{"css=#eleId.className", ByCssSelector.class}); data.add(new Object[]{"tagName=div", ByTagName.class}); data.add(new Object[]{"link=Link Text", ByLinkText.class}); data.add(new Object[]{"partialLink=Link Text", ByPartialLinkText.class}); data.add(new Object[]{"['css=#qa','name=eleName']", ByAny.class}); // self descriptive data.add(new Object[]{"{'locator' : 'id=eleId'; 'desc' : 'locate element by id'}", ById.class}); data.add(new Object[]{ "{'locator' : 'name=eleName'; 'desc' : 'locate element by name'}", ByName.class}); data.add(new Object[]{ "{'locator' : 'css=#eleId.className'; 'desc' : 'locate element by css'}", ByCssSelector.class}); data.add(new Object[]{ "{'locator' : ['css=#qa','name=eleName']; 'desc' : 'locate element by css'}", ByAny.class}); data.add(new Object[]{"xpath=//*[text()='Albany-Rensselaer, NY (ALB)']", ByXPath.class}); return data.iterator(); }