@@ -30,13 +30,15 @@ nature and relationship in the tree to return a value.
3030{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L20-L25" >}}
3131{{< /tab >}}
3232{{< tab header="Python" >}}
33+
3334# Navigate to the url
3435driver.get("https://www.selenium.dev/selenium/web/inputs.html ")
3536
3637# Get boolean value for is element display
3738is_email_visible = driver.find_element(By.NAME, "email_input").is_displayed()
39+
3840{{< /tab >}}
39- {{< tab header="CSharp" >}}
41+ {{< tab header="CSharp" text=true >}}
4042{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L18-L23" >}}
4143{{< /tab >}}
4244{{< tab header="Ruby" text=true >}}
@@ -46,11 +48,13 @@ is_email_visible = driver.find_element(By.NAME, "email_input").is_displayed()
4648{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L16-L17">}}
4749{{< /tab >}}
4850{{< tab header="Kotlin" >}}
51+
4952//navigates to url
5053 driver.get("https://www.selenium.dev/selenium/web/inputs.html ")
5154
52- //returns true if element is displayed else returns false
55+ //returns true if element is displayed else returns false
5356 val flag = driver.findElement(By.name("email_input")).isDisplayed()
57+
5458{{< /tab >}}
5559{{< /tabpane >}}
5660
@@ -65,29 +69,29 @@ is_email_visible = driver.find_element(By.NAME, "email_input").is_displayed()
6569{{< tab header="Java" text=true >}}
6670{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L27-L30" >}}
6771{{< /tab >}}
68- {{< tab header="Python" >}}
69- # Navigate to url
72+ {{< tab header="Python" >}}
73+ # Navigate to url
7074driver.get("https://www.selenium.dev/selenium/web/inputs.html ")
7175
72- # Returns true if element is enabled else returns false
76+ # Returns true if element is enabled else returns false
7377value = driver.find_element(By.NAME, 'button_input').is_enabled()
74- {{< /tab >}}
75- {{< tab header="CSharp" >}}
78+ {{< /tab >}}
79+ {{< tab header="CSharp" text=true >}}
7680{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L25-L28" >}}
7781{{< /tab >}}
7882{{< tab header="Ruby" text=true >}}
7983{{< gh-codeblock path="/examples/ruby/spec/elements/information_spec.rb#L17">}}
8084{{< /tab >}}
8185{{< tab header="JavaScript" text=true >}}
8286{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L23-L24">}}
83- {{< /tab >}}
84- {{< tab header="Kotlin" >}}
87+ {{< /tab >}}
88+ {{< tab header="Kotlin" >}}
8589 //navigates to url
8690 driver.get("https://www.selenium.dev/selenium/web/inputs.html ")
8791
88- //returns true if element is enabled else returns false
92+ //returns true if element is enabled else returns false
8993 val attr = driver.findElement(By.name("button_input")).isEnabled()
90- {{< /tab >}}
94+ {{< /tab >}}
9195{{< /tabpane >}}
9296
9397## 要素が選択されているかどうか
@@ -101,14 +105,14 @@ value = driver.find_element(By.NAME, 'button_input').is_enabled()
101105{{< tab header="Java" text=true >}}
102106{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L32-L35" >}}
103107{{< /tab >}}
104- {{< tab header="Python" >}}
105- # Navigate to url
108+ {{< tab header="Python" >}}
109+ # Navigate to url
106110driver.get("https://www.selenium.dev/selenium/web/inputs.html ")
107111
108- # Returns true if element is checked else returns false
112+ # Returns true if element is checked else returns false
109113value = driver.find_element(By.NAME, "checkbox_input").is_selected()
110- {{< /tab >}}
111- {{< tab header="CSharp" >}}
114+ {{< /tab >}}
115+ {{< tab header="CSharp" text=true >}}
112116{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L30-L33" >}}
113117{{< /tab >}}
114118{{< tab header="Ruby" text=true >}}
@@ -117,13 +121,13 @@ value = driver.find_element(By.NAME, "checkbox_input").is_selected()
117121{{< tab header="JavaScript" text=true >}}
118122{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L30-L31">}}
119123{{< /tab >}}
120- {{< tab header="Kotlin" >}}
121- //navigates to url
122- driver.get("https://www.selenium.dev/selenium/web/inputs.html ")
124+ {{< tab header="Kotlin" >}}
125+ //navigates to url
126+ driver.get("https://www.selenium.dev/selenium/web/inputs.html ")
123127
124- //returns true if element is checked else returns false
125- val attr = driver.findElement(By.name("checkbox_input")).isSelected()
126- {{< /tab >}}
128+ //returns true if element is checked else returns false
129+ val attr = driver.findElement(By.name("checkbox_input")).isSelected()
130+ {{< /tab >}}
127131{{< /tabpane >}}
128132
129133## 要素のタグ名を取得
@@ -135,14 +139,14 @@ value = driver.find_element(By.NAME, "checkbox_input").is_selected()
135139{{< tab header="Java" text=true >}}
136140{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L37-L40" >}}
137141{{< /tab >}}
138- {{< tab header="Python" >}}
139- # Navigate to url
142+ {{< tab header="Python" >}}
143+ # Navigate to url
140144driver.get("https://www.selenium.dev/selenium/web/inputs.html ")
141145
142- # Returns TagName of the element
146+ # Returns TagName of the element
143147attr = driver.find_element(By.NAME, "email_input").tag_name
144- {{< /tab >}}
145- {{< tab header="CSharp" >}}
148+ {{< /tab >}}
149+ {{< tab header="CSharp" text=true >}}
146150{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L35-L38" >}}
147151{{< /tab >}}
148152{{< tab header="Ruby" text=true >}}
@@ -151,13 +155,13 @@ attr = driver.find_element(By.NAME, "email_input").tag_name
151155{{< tab header="JavaScript" text=true >}}
152156{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L37-L38">}}
153157{{< /tab >}}
154- {{< tab header="Kotlin" >}}
155- //navigates to url
156- driver.get("https://www.selenium.dev/selenium/web/inputs.html ")
158+ {{< tab header="Kotlin" >}}
159+ //navigates to url
160+ driver.get("https://www.selenium.dev/selenium/web/inputs.html ")
157161
158- //returns TagName of the element
159- val attr = driver.findElement(By.name("email_input")).getTagName()
160- {{< /tab >}}
162+ //returns TagName of the element
163+ val attr = driver.findElement(By.name("email_input")).getTagName()
164+ {{< /tab >}}
161165{{< /tabpane >}}
162166
163167## 要素矩形を取得
@@ -175,14 +179,14 @@ attr = driver.find_element(By.NAME, "email_input").tag_name
175179{{< tab header="Java" text=true >}}
176180{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L42-L46" >}}
177181{{< /tab >}}
178- {{< tab header="Python" >}}
179- # Navigate to url
182+ {{< tab header="Python" >}}
183+ # Navigate to url
180184driver.get("https://www.selenium.dev/selenium/web/inputs.html ")
181185
182- # Returns height, width, x and y coordinates referenced element
186+ # Returns height, width, x and y coordinates referenced element
183187res = driver.find_element(By.NAME, "range_input").rect
184- {{< /tab >}}
185- {{< tab header="CSharp" >}}
188+ {{< /tab >}}
189+ {{< tab header="CSharp" text=true >}}
186190{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L40-L47" >}}
187191{{< /tab >}}
188192{{< tab header="Ruby" text=true >}}
@@ -191,7 +195,7 @@ res = driver.find_element(By.NAME, "range_input").rect
191195{{< tab header="JavaScript" text=true >}}
192196{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L45">}}
193197{{< /tab >}}
194- {{< tab header="Kotlin" >}}
198+ {{< tab header="Kotlin" >}}
195199// Navigate to url
196200driver.get("https://www.selenium.dev/selenium/web/inputs.html ")
197201
@@ -211,52 +215,48 @@ println(res.getX())
211215{{< tab header="Java" text=true >}}
212216{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L49-L51" >}}
213217{{< /tab >}}
214- {{< tab header="Python" >}}
215-
216- # Navigate to Url
218+ {{< tab header="Python" >}}
219+ # Navigate to Url
217220driver.get('https://www.selenium.dev/selenium/web/colorPage.html ')
218221
219- # Retrieves the computed style property 'color' of linktext
222+ # Retrieves the computed style property 'color' of linktext
220223cssValue = driver.find_element(By.ID, "namedColor").value_of_css_property('background-color')
221224
222- {{< /tab >}}
223- {{< tab header="CSharp" >}}
225+ {{< /tab >}}
226+ {{< tab header="CSharp" text=true >}}
224227{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L49-L51" >}}
225228{{< /tab >}}
226- {{< tab header="Ruby" text=true >}}
227- {{< gh-codeblock path="/examples/ruby/spec/elements/information_spec.rb#L38">}}
228- {{< /tab >}}
229- {{< tab header="JavaScript" text=true >}}
230- {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L76-L78">}}
231- {{< /tab >}}
232- {{< tab header="Kotlin" >}}
233-
229+ {{< tab header="Ruby" text=true >}}
230+ {{< gh-codeblock path="/examples/ruby/spec/elements/information_spec.rb#L38">}}
231+ {{< /tab >}}
232+ {{< tab header="JavaScript" text=true >}}
233+ {{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L76-L78">}}
234+ {{< /tab >}}
235+ {{< tab header="Kotlin" >}}
234236// Navigate to Url
235237driver.get("https://www.selenium.dev/selenium/web/colorPage.html ")
236238
237239// Retrieves the computed style property 'color' of linktext
238240val cssValue = driver.findElement(By.id("namedColor")).getCssValue("background-color")
239-
240- {{< /tab >}}
241+ {{< /tab >}}
241242{{< /tabpane >}}
242243
243244## 要素テキストを取得
244245
245246指定された要素のレンダリングされたテキストを取得します。
246247
247-
248248{{< tabpane langEqualsHeader=true >}}
249249{{< tab header="Java" text=true >}}
250250{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L54-L57" >}}
251251{{< /tab >}}
252- {{< tab header="Python" >}}
253- # Navigate to url
252+ {{< tab header="Python" >}}
253+ # Navigate to url
254254driver.get("https://www.selenium.dev/selenium/web/linked_image.html ")
255255
256- # Retrieves the text of the element
256+ # Retrieves the text of the element
257257text = driver.find_element(By.ID, "justanotherlink").text
258- {{< /tab >}}
259- {{< tab header="CSharp" >}}
258+ {{< /tab >}}
259+ {{< tab header="CSharp" text=true >}}
260260{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L53-L56" >}}
261261{{< /tab >}}
262262{{< tab header="Ruby" text=true >}}
@@ -265,13 +265,13 @@ text = driver.find_element(By.ID, "justanotherlink").text
265265{{< tab header="JavaScript" text=true >}}
266266{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L84-L86">}}
267267{{< /tab >}}
268- {{< tab header="Kotlin" >}}
268+ {{< tab header="Kotlin" >}}
269269// Navigate to URL
270270driver.get("https://www.selenium.dev/selenium/web/linked_image.html ")
271271
272272// retrieves the text of the element
273273val text = driver.findElement(By.id("justanotherlink")).getText()
274- {{< /tab >}}
274+ {{< /tab >}}
275275{{< /tabpane >}}
276276
277277## Fetching Attributes or Properties
@@ -284,7 +284,8 @@ with the DOM attribute or property of the element.
284284{{< tab header="Java" text=true >}}
285285{{< gh-codeblock path="examples/java/src/test/java/dev/selenium/elements/InformationTest.java#L60-L65" >}}
286286{{< /tab >}}
287- {{< tab header="Python" >}}
287+ {{< tab header="Python" >}}
288+
288289# Navigate to the url
289290driver.get("https://www.selenium.dev/selenium/web/inputs.html ")
290291
@@ -293,8 +294,9 @@ email_txt = driver.find_element(By.NAME, "email_input")
293294
294295# Fetch the value property associated with the textbox
295296value_info = email_txt.get_attribute("value")
296- {{< /tab >}}
297- {{< tab header="CSharp" >}}
297+
298+ {{< /tab >}}
299+ {{< tab header="CSharp" text=true >}}
298300{{< gh-codeblock path="examples/dotnet/SeleniumDocs/Elements/InformationTest.cs#L58-L63" >}}
299301{{< /tab >}}
300302{{< tab header="Ruby" text=true >}}
@@ -303,11 +305,13 @@ value_info = email_txt.get_attribute("value")
303305{{< tab header="JavaScript" text=true >}}
304306{{< gh-codeblock path="/examples/javascript/test/elements/information.spec.js#L55-L59">}}
305307{{< /tab >}}
306- {{< tab header="Kotlin" >}}
308+ {{< tab header="Kotlin" >}}
309+
307310// Navigate to URL
308311driver.get("https://www.selenium.dev/selenium/web/inputs.html ")
309312
310313//fetch the value property associated with the textbox
311314val attr = driver.findElement(By.name("email_input")).getAttribute("value")
312- {{< /tab >}}
313- {{< /tabpane >}}
315+
316+ {{< /tab >}}
317+ {{< /tabpane >}}
0 commit comments