@@ -29,14 +29,8 @@ nature and relationship in the tree to return a value.
29
29
{{< tab header="Java" text=true >}}
30
30
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L20-L25" >}}
31
31
{{< /tab >}}
32
- {{< tab header="Python" >}}
33
-
34
- # Navigate to the url
35
- driver.get("https://www.selenium.dev/selenium/web/inputs.html ")
36
-
37
- # Get boolean value for is element display
38
- is_email_visible = driver.find_element(By.NAME, "email_input").is_displayed()
39
-
32
+ {{< tab header="Python" text=true >}}
33
+ {{< gh-codeblock path="examples/python/tests/elements/test_information.py#L12-L15" >}}
40
34
{{< /tab >}}
41
35
{{< tab header="CSharp" text=true >}}
42
36
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L18-L23" >}}
@@ -69,12 +63,8 @@ is_email_visible = driver.find_element(By.NAME, "email_input").is_displayed()
69
63
{{< tab header="Java" text=true >}}
70
64
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L27-L30" >}}
71
65
{{< /tab >}}
72
- {{< tab header="Python" >}}
73
- # Navigate to url
74
- driver.get("https://www.selenium.dev/selenium/web/inputs.html ")
75
-
76
- # Returns true if element is enabled else returns false
77
- value = driver.find_element(By.NAME, 'button_input').is_enabled()
66
+ {{< tab header="Python" text=true >}}
67
+ {{< gh-codeblock path="examples/python/tests/elements/test_information.py#L19" >}}
78
68
{{< /tab >}}
79
69
{{< tab header="CSharp" text=true >}}
80
70
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L25-L28" >}}
@@ -105,12 +95,8 @@ value = driver.find_element(By.NAME, 'button_input').is_enabled()
105
95
{{< tab header="Java" text=true >}}
106
96
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L32-L35" >}}
107
97
{{< /tab >}}
108
- {{< tab header="Python" >}}
109
- # Navigate to url
110
- driver.get("https://www.selenium.dev/selenium/web/inputs.html ")
111
-
112
- # Returns true if element is checked else returns false
113
- value = driver.find_element(By.NAME, "checkbox_input").is_selected()
98
+ {{< tab header="Python" text=true >}}
99
+ {{< gh-codeblock path="examples/python/tests/elements/test_information.py#L23" >}}
114
100
{{< /tab >}}
115
101
{{< tab header="CSharp" text=true >}}
116
102
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L30-L33" >}}
@@ -139,12 +125,8 @@ val attr = driver.findElement(By.name("checkbox_input")).isSelected()
139
125
{{< tab header="Java" text=true >}}
140
126
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L37-L40" >}}
141
127
{{< /tab >}}
142
- {{< tab header="Python" >}}
143
- # Navigate to url
144
- driver.get("https://www.selenium.dev/selenium/web/inputs.html ")
145
-
146
- # Returns TagName of the element
147
- attr = driver.find_element(By.NAME, "email_input").tag_name
128
+ {{< tab header="Python" text=true >}}
129
+ {{< gh-codeblock path="examples/python/tests/elements/test_information.py#L27" >}}
148
130
{{< /tab >}}
149
131
{{< tab header="CSharp" text=true >}}
150
132
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L35-L38" >}}
@@ -179,13 +161,9 @@ val attr = driver.findElement(By.name("email_input")).getTagName()
179
161
{{< tab header="Java" text=true >}}
180
162
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L42-L46" >}}
181
163
{{< /tab >}}
182
- {{< tab header="Python" >}}
183
- # Navigate to url
184
- driver.get("https://www.selenium.dev/selenium/web/inputs.html ")
185
-
186
- # Returns height, width, x and y coordinates referenced element
187
- res = driver.find_element(By.NAME, "range_input").rect
188
- {{< /tab >}}
164
+ {{< tab header="Python" text=true >}}
165
+ {{< gh-codeblock path="examples/python/tests/elements/test_information.py#L31" >}}
166
+ {{< /tab >}}
189
167
{{< tab header="CSharp" text=true >}}
190
168
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L40-L47" >}}
191
169
{{< /tab >}}
@@ -215,14 +193,9 @@ println(res.getX())
215
193
{{< tab header="Java" text=true >}}
216
194
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L49-L51" >}}
217
195
{{< /tab >}}
218
- {{< tab header="Python" >}}
219
- # Navigate to Url
220
- driver.get('https://www.selenium.dev/selenium/web/colorPage.html ')
221
-
222
- # Retrieves the computed style property 'color' of linktext
223
- cssValue = driver.find_element(By.ID, "namedColor").value_of_css_property('background-color')
224
-
225
- {{< /tab >}}
196
+ {{< tab header="Python" text=true >}}
197
+ {{< gh-codeblock path="examples/python/tests/elements/test_information.py#L35-L37" >}}
198
+ {{< /tab >}}
226
199
{{< tab header="CSharp" text=true >}}
227
200
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L49-L51" >}}
228
201
{{< /tab >}}
@@ -249,12 +222,8 @@ val cssValue = driver.findElement(By.id("namedColor")).getCssValue("background-c
249
222
{{< tab header="Java" text=true >}}
250
223
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L54-L57" >}}
251
224
{{< /tab >}}
252
- {{< tab header="Python" >}}
253
- # Navigate to url
254
- driver.get("https://www.selenium.dev/selenium/web/linked_image.html ")
255
-
256
- # Retrieves the text of the element
257
- text = driver.find_element(By.ID, "justanotherlink").text
225
+ {{< tab header="Python" text=true >}}
226
+ {{< gh-codeblock path="examples/python/tests/elements/test_information.py#L41" >}}
258
227
{{< /tab >}}
259
228
{{< tab header="CSharp" text=true >}}
260
229
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L53-L56" >}}
@@ -284,18 +253,9 @@ with the DOM attribute or property of the element.
284
253
{{< tab header="Java" text=true >}}
285
254
{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L60-L65" >}}
286
255
{{< /tab >}}
287
- {{< tab header="Python" >}}
288
-
289
- # Navigate to the url
290
- driver.get("https://www.selenium.dev/selenium/web/inputs.html ")
291
-
292
- # Identify the email text box
293
- email_txt = driver.find_element(By.NAME, "email_input")
294
-
295
- # Fetch the value property associated with the textbox
296
- value_info = email_txt.get_attribute("value")
297
-
298
- {{< /tab >}}
256
+ {{< tab header="Python" text=true >}}
257
+ {{< gh-codeblock path="examples/python/tests/elements/test_information.py#L44-L46" >}}
258
+ {{< /tab >}}
299
259
{{< tab header="CSharp" text=true >}}
300
260
{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L58-L63" >}}
301
261
{{< /tab >}}
0 commit comments