-
-
Notifications
You must be signed in to change notification settings - Fork 760
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
13 changed files
with
446 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
src/main/java/io/appium/java_client/FindsByFluentSelector.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
/* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* See the NOTICE file distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.appium.java_client; | ||
|
||
import org.openqa.selenium.NoSuchElementException; | ||
import org.openqa.selenium.WebDriverException; | ||
import org.openqa.selenium.WebElement; | ||
|
||
import java.util.List; | ||
|
||
public interface FindsByFluentSelector<T extends WebElement> { | ||
|
||
/** | ||
* Method performs the searching for a single element by some selector defined by string | ||
* and value of the given selector | ||
* | ||
* @param by is a string selector | ||
* @param using is a value of the given selector | ||
* @return the first found element | ||
* | ||
* @throws WebDriverException when current session doesn't support the given selector or when | ||
* value of the selector is not consistent. | ||
* @throws NoSuchElementException when no one element is found | ||
*/ | ||
T findElement(String by, String using) throws WebDriverException, NoSuchElementException; | ||
|
||
/** | ||
* Method performs the searching for a list of elements by some selector defined by string | ||
* and value of the given selector | ||
* | ||
* @param by is a string selector | ||
* @param using is a value of the given selector | ||
* @return a list of elements | ||
* | ||
* @throws WebDriverException when current session doesn't support the given selector or when | ||
* value of the selector is not consistent. | ||
*/ | ||
List<T> findElements(String by, String using) throws WebDriverException; | ||
} |
28 changes: 28 additions & 0 deletions
28
src/main/java/io/appium/java_client/FindsByIosNSPredicate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* See the NOTICE file distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
package io.appium.java_client; | ||
|
||
import org.openqa.selenium.WebElement; | ||
|
||
import java.util.List; | ||
|
||
public interface FindsByIosNSPredicate<T extends WebElement> { | ||
|
||
T findElementByIosNsPredicate(String using); | ||
|
||
List<T> findElementsByIosNsPredicate(String using); | ||
} |
41 changes: 41 additions & 0 deletions
41
src/main/java/io/appium/java_client/FindsByWindowsAutomation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
/* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* See the NOTICE file distributed with this work for additional | ||
* information regarding copyright ownership. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
|
||
package io.appium.java_client; | ||
|
||
import org.openqa.selenium.WebElement; | ||
|
||
import java.util.List; | ||
|
||
public interface FindsByWindowsAutomation<T extends WebElement> { | ||
|
||
/** | ||
* Finds the first of elements that match the Windows UIAutomation selector supplied. | ||
* | ||
* @param selector a Windows UIAutomation selector | ||
* @return The first element that matches the given selector | ||
*/ | ||
T findElementByWindowsUIAutomation(String selector); | ||
|
||
/** | ||
* Finds a list of elements that match the Windows UIAutomation selector supplied. | ||
* | ||
* @param selector a Windows UIAutomation selector | ||
* @return a list of elements that match the given selector | ||
*/ | ||
List<T> findElementsByWindowsUIAutomation(String selector); | ||
} |
Oops, something went wrong.