Skip to content

Commit dc3408a

Browse files
committed
2 parents d700cc0 + 2b7fec4 commit dc3408a

File tree

1 file changed

+38
-12
lines changed

1 file changed

+38
-12
lines changed

README.md

Lines changed: 38 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Selenium.WebDriver.SimpleExtensions
22

3+
![Nuget](https://img.shields.io/nuget/v/Selenium.WebDriver.SimpleExtensions)
4+
35
A robust and versatile Selenium WebDriver extension library to simplify web element and browser interactions.
46

57
## OverviewOverview
@@ -8,34 +10,58 @@ This library consists of two primary sets of extension methods: WebElementExtens
810
## WebElementExtensions
911
This class offers a series of helper methods to easily traverse the DOM:
1012

11-
**GetParent:** Returns the parent of the current element.
13+
**GetParent**
14+
15+
Returns the parent of the current element.
16+
17+
**GetNextSibling**
18+
19+
Returns the next sibling of the current element.
20+
21+
**GetPreviousSibling**
22+
23+
Returns the previous sibling of the current element.
24+
25+
**GetSiblingByIndex**
1226

13-
**GetNextSibling:** Returns the next sibling of the current element.
27+
Returns a sibling of the current element at a specified index.
1428

15-
**GetPreviousSibling:** Returns the previous sibling of the current element.
29+
**GetFirstChild**
1630

17-
**GetSiblingByIndex:** Returns a sibling of the current element at a specified index.
31+
Returns the first child of the current element.
1832

19-
**GetFirstChild:** Returns the first child of the current element.
33+
**GetLastChild**
2034

21-
**GetLastChild:** Returns the last child of the current element.
35+
Returns the last child of the current element.
2236

23-
**GetChildByIndex:** Returns a child of the current element at a specified index.
37+
**GetChildByIndex**
2438

25-
**GetChildByText:** Returns a child of the current element that matches a specified text.
39+
Returns a child of the current element at a specified index.
2640

27-
**GetChildThatContainsText:** Returns a child of the current element that contains a specified text.
41+
**GetChildByText**
2842

29-
**GetParent(int skip):** Returns the parent of the current element, skipping a specified number of levels.
43+
Returns a child of the current element that matches a specified text.
44+
45+
**GetChildThatContainsText**
46+
47+
Returns a child of the current element that contains a specified text.
48+
49+
**GetParent(int skip)**
50+
51+
Returns the parent of the current element, skipping a specified number of levels.
3052

3153
*Please note that the GetParent(int skip) method throws an ArgumentException if the skip parameter is less than 0.*
3254

3355
## WebDriverExtensions
3456
This class includes methods to execute JavaScript scripts directly in the browser:
3557

36-
**ExecuteJavaScript:** Executes a JavaScript script in the browser and returns the result casted to a specified type.
58+
**ExecuteJavaScript:**
59+
60+
Executes a JavaScript script in the browser and returns the result casted to a specified type.
61+
62+
**ExecuteJavaScriptAndDeserialize:**
3763

38-
**ExecuteJavaScriptAndDeserialize:** Executes a JavaScript script in the browser, serializes the result into a JSON string, and then deserializes that string into an object of a specified type.
64+
Executes a JavaScript script in the browser, serializes the result into a JSON string, and then deserializes that string into an object of a specified type.
3965

4066
## Getting Started
4167
To use these extensions, first add a reference to this library in your project. Then, in your code, use the methods on instances of IWebElement and IWebDriver as required.

0 commit comments

Comments
 (0)