-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'trunk' into update-python-locators-docs
- Loading branch information
Showing
78 changed files
with
854 additions
and
185 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
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
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
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
39 changes: 38 additions & 1 deletion
39
examples/java/src/test/java/dev/selenium/elements/LocatorsTest.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 |
---|---|---|
@@ -1,7 +1,44 @@ | ||
package dev.selenium.elements; | ||
|
||
import org.openqa.selenium.By; | ||
import org.openqa.selenium.support.pagefactory.ByAll; | ||
import org.openqa.selenium.support.pagefactory.ByChained; | ||
import dev.selenium.BaseTest; | ||
import java.util.List; | ||
|
||
import org.openqa.selenium.WebDriver; | ||
import org.openqa.selenium.WebElement; | ||
import org.openqa.selenium.chrome.ChromeDriver; | ||
|
||
public class LocatorsTest extends BaseTest { | ||
|
||
|
||
public void ByAllTest() { | ||
// Create instance of ChromeDriver | ||
WebDriver driver = new ChromeDriver(); | ||
// Navigate to Url | ||
driver.get("https://www.selenium.dev/selenium/web/login.html"); | ||
|
||
// get both logins | ||
By example = new ByAll(By.id("password-field"), By.id("username-field")); | ||
List<WebElement> login_inputs = driver.findElements(example); | ||
|
||
//send them both input | ||
login_inputs.get(0).sendKeys("username"); | ||
login_inputs.get(1).sendKeys("password"); | ||
} | ||
|
||
public String ByChainedTest() { | ||
// Create instance of ChromeDriver | ||
WebDriver driver = new ChromeDriver(); | ||
// Navigate to Url | ||
driver.get("https://www.selenium.dev/selenium/web/login.html"); | ||
|
||
// Find username-field inside of login-form | ||
By example = new ByChained(By.id("login-form"), By.id("username-field")); | ||
WebElement username_input = driver.findElement(example); | ||
|
||
//return placeholder text | ||
String placeholder = username_input.getAttribute("placeholder"); | ||
return placeholder; | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
selenium==4.24.0 | ||
selenium==4.25.0 | ||
pytest | ||
trio | ||
pytest-trio | ||
|
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
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
Binary file renamed
BIN
+36.2 MB
examples/selenium-server-4.23.0.jar → examples/selenium-server-4.25.0.jar
Binary file not shown.
Binary file not shown.
Oops, something went wrong.