@@ -81,7 +81,7 @@ available in Selenium.
81
81
driver.findElement(By.className("information"));
82
82
{{< /tab >}}
83
83
{{< tab header="Python" text=true >}}
84
- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L10 " >}}
84
+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L9 " >}}
85
85
{{< /tab >}}
86
86
{{< tab header="CSharp" >}}
87
87
var driver = new ChromeDriver();
@@ -114,7 +114,7 @@ textbox, using css.
114
114
driver.findElement(By.cssSelector("#fname"));
115
115
{{< /tab >}}
116
116
{{< tab header="Python" text=true >}}
117
- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L18 " >}}
117
+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L17 " >}}
118
118
{{< /tab >}}
119
119
{{< tab header="CSharp" >}}
120
120
var driver = new ChromeDriver();
@@ -145,7 +145,7 @@ We will identify the Last Name field using it.
145
145
driver.findElement(By.id("lname"));
146
146
{{< /tab >}}
147
147
{{< tab header="Python" text=true >}}
148
- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L26 " >}}
148
+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L25 " >}}
149
149
{{< /tab >}}
150
150
{{< tab header="CSharp" >}}
151
151
var driver = new ChromeDriver();
@@ -177,7 +177,7 @@ We will identify the Newsletter checkbox using it.
177
177
driver.findElement(By.name("newsletter"));
178
178
{{< /tab >}}
179
179
{{< tab header="Python" text=true >}}
180
- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L34 " >}}
180
+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L33 " >}}
181
181
{{< /tab >}}
182
182
{{< tab header="CSharp" >}}
183
183
var driver = new ChromeDriver();
@@ -207,7 +207,7 @@ In the HTML snippet shared, we have a link available, let's see how will we loca
207
207
driver.findElement(By.linkText("Selenium Official Page"));
208
208
{{< /tab >}}
209
209
{{< tab header="Python" text=true >}}
210
- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L42 " >}}
210
+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L41 " >}}
211
211
{{< /tab >}}
212
212
{{< tab header="CSharp" >}}
213
213
var driver = new ChromeDriver();
@@ -238,7 +238,7 @@ In the HTML snippet shared, we have a link available, lets see how will we locat
238
238
driver.findElement(By.partialLinkText("Official Page"));
239
239
{{< /tab >}}
240
240
{{< tab header="Python" text=true >}}
241
- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L50 " >}}
241
+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L49 " >}}
242
242
{{< /tab >}}
243
243
{{< tab header="CSharp" >}}
244
244
var driver = new ChromeDriver();
@@ -267,7 +267,7 @@ From the above HTML snippet shared, lets identify the link, using its html tag "
267
267
driver.findElement(By.tagName("a"));
268
268
{{< /tab >}}
269
269
{{< tab header="Python" text=true >}}
270
- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L58 " >}}
270
+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L57 " >}}
271
271
{{< /tab >}}
272
272
{{< tab header="CSharp" >}}
273
273
var driver = new ChromeDriver();
@@ -302,7 +302,7 @@ first name text box. Let us create locator for female radio button using xpath.
302
302
driver.findElement(By.xpath("//input[ @value ='f'] "));
303
303
{{< /tab >}}
304
304
{{< tab header="Python" text=true >}}
305
- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L66 " >}}
305
+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L65 " >}}
306
306
{{< /tab >}}
307
307
{{< tab header="CSharp" >}}
308
308
var driver = new ChromeDriver();
@@ -338,7 +338,7 @@ others it's as simple as setting a parameter in the FindElement function
338
338
driver.findElement(By.className("information"));
339
339
{{< /tab >}}
340
340
{{< tab header="Python" text=true >}}
341
- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L10 " >}}
341
+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L9 " >}}
342
342
{{< /tab >}}
343
343
{{< tab header="CSharp" >}}
344
344
var driver = new ChromeDriver();
@@ -445,7 +445,7 @@ we can locate the text field element using the fact that it is an "input" elemen
445
445
By emailLocator = RelativeLocator.with(By.tagName("input")).above(By.id("password"));
446
446
{{< /tab >}}
447
447
{{< tab header="Python" text=true >}}
448
- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L75 " >}}
448
+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L73 " >}}
449
449
{{< /tab >}}
450
450
{{< tab header="CSharp" >}}
451
451
var emailLocator = RelativeBy.WithLocator(By.TagName("input")).Above(By.Id("password"));
@@ -472,7 +472,7 @@ we can locate the text field element using the fact that it is an "input" elemen
472
472
By passwordLocator = RelativeLocator.with(By.tagName("input")).below(By.id("email"));
473
473
{{< /tab >}}
474
474
{{< tab header="Python" text=true >}}
475
- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L77 " >}}
475
+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L75 " >}}
476
476
{{< /tab >}}
477
477
{{< tab header="CSharp" >}}
478
478
var passwordLocator = RelativeBy.WithLocator(By.TagName("input")).Below(By.Id("email"));
@@ -499,7 +499,7 @@ we can locate the cancel button element using the fact that it is a "button" ele
499
499
By cancelLocator = RelativeLocator.with(By.tagName("button")).toLeftOf(By.id("submit"));
500
500
{{< /tab >}}
501
501
{{< tab header="Python" text=true >}}
502
- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L79 " >}}
502
+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L77 " >}}
503
503
{{< /tab >}}
504
504
{{< tab header="CSharp" >}}
505
505
var cancelLocator = RelativeBy.WithLocator(By.tagName("button")).LeftOf(By.Id("submit"));
@@ -526,7 +526,7 @@ we can locate the submit button element using the fact that it is a "button" ele
526
526
By submitLocator = RelativeLocator.with(By.tagName("button")).toRightOf(By.id("cancel"));
527
527
{{< /tab >}}
528
528
{{< tab header="Python" text=true >}}
529
- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L81 " >}}
529
+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L79 " >}}
530
530
{{< /tab >}}
531
531
{{< tab header="CSharp" >}}
532
532
var submitLocator = RelativeBy.WithLocator(By.tagName("button")).RightOf(By.Id("cancel"));
@@ -555,7 +555,7 @@ but its associated [input label element](https://developer.mozilla.org/en-US/doc
555
555
By emailLocator = RelativeLocator.with(By.tagName("input")).near(By.id("lbl-email"));
556
556
{{< /tab >}}
557
557
{{< tab header="Python" text=true >}}
558
- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L83 " >}}
558
+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L81 " >}}
559
559
{{< /tab >}}
560
560
{{< tab header="CSharp" >}}
561
561
var emailLocator = RelativeBy.WithLocator(By.tagName("input")).Near(By.Id("lbl-email"));
@@ -581,7 +581,7 @@ You can also chain locators if needed. Sometimes the element is most easily iden
581
581
By submitLocator = RelativeLocator.with(By.tagName("button")).below(By.id("email")).toRightOf(By.id("cancel"));
582
582
{{< /tab >}}
583
583
{{< tab header="Python" text=true >}}
584
- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L85 " >}}
584
+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L83 " >}}
585
585
{{< /tab >}}
586
586
{{< tab header="CSharp" >}}
587
587
var submitLocator = RelativeBy.WithLocator(By.tagName("button")).Below(By.Id("email")).RightOf(By.Id("cancel"));
0 commit comments