@@ -81,7 +81,7 @@ available in Selenium.
8181 driver.findElement(By.className("information"));
8282 {{< /tab >}}
8383 {{< 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 " >}}
8585 {{< /tab >}}
8686 {{< tab header="CSharp" >}}
8787 var driver = new ChromeDriver();
@@ -114,7 +114,7 @@ textbox, using css.
114114 driver.findElement(By.cssSelector("#fname"));
115115 {{< /tab >}}
116116 {{< 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 " >}}
118118 {{< /tab >}}
119119 {{< tab header="CSharp" >}}
120120 var driver = new ChromeDriver();
@@ -145,7 +145,7 @@ We will identify the Last Name field using it.
145145 driver.findElement(By.id("lname"));
146146 {{< /tab >}}
147147 {{< 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 " >}}
149149 {{< /tab >}}
150150 {{< tab header="CSharp" >}}
151151 var driver = new ChromeDriver();
@@ -177,7 +177,7 @@ We will identify the Newsletter checkbox using it.
177177 driver.findElement(By.name("newsletter"));
178178 {{< /tab >}}
179179 {{< 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 " >}}
181181 {{< /tab >}}
182182 {{< tab header="CSharp" >}}
183183 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
207207 driver.findElement(By.linkText("Selenium Official Page"));
208208 {{< /tab >}}
209209 {{< 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 " >}}
211211 {{< /tab >}}
212212 {{< tab header="CSharp" >}}
213213 var driver = new ChromeDriver();
@@ -238,7 +238,7 @@ In the HTML snippet shared, we have a link available, lets see how will we locat
238238 driver.findElement(By.partialLinkText("Official Page"));
239239 {{< /tab >}}
240240 {{< 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 " >}}
242242 {{< /tab >}}
243243 {{< tab header="CSharp" >}}
244244 var driver = new ChromeDriver();
@@ -267,7 +267,7 @@ From the above HTML snippet shared, lets identify the link, using its html tag "
267267 driver.findElement(By.tagName("a"));
268268 {{< /tab >}}
269269 {{< 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 " >}}
271271 {{< /tab >}}
272272 {{< tab header="CSharp" >}}
273273 var driver = new ChromeDriver();
@@ -302,7 +302,7 @@ first name text box. Let us create locator for female radio button using xpath.
302302 driver.findElement(By.xpath("//input[ @value ='f'] "));
303303 {{< /tab >}}
304304 {{< 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 " >}}
306306 {{< /tab >}}
307307 {{< tab header="CSharp" >}}
308308 var driver = new ChromeDriver();
@@ -336,7 +336,7 @@ others it's as simple as setting a parameter in the FindElement function
336336 driver.findElement(By.className("information"));
337337 {{< /tab >}}
338338 {{< tab header="Python" text=true >}}
339- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L10 " >}}
339+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L9 " >}}
340340 {{< /tab >}}
341341 {{< tab header="CSharp" >}}
342342 var driver = new ChromeDriver();
@@ -390,7 +390,7 @@ we can locate the text field element using the fact that it is an "input" elemen
390390By emailLocator = RelativeLocator.with(By.tagName("input")).above(By.id("password"));
391391{{< /tab >}}
392392{{< tab header="Python" text=true >}}
393- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L75 " >}}
393+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L73 " >}}
394394{{< /tab >}}
395395{{< tab header="CSharp" >}}
396396var emailLocator = RelativeBy.WithLocator(By.TagName("input")).Above(By.Id("password"));
@@ -417,7 +417,7 @@ we can locate the text field element using the fact that it is an "input" elemen
417417By passwordLocator = RelativeLocator.with(By.tagName("input")).below(By.id("email"));
418418{{< /tab >}}
419419{{< tab header="Python" text=true >}}
420- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L77 " >}}
420+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L75 " >}}
421421{{< /tab >}}
422422{{< tab header="CSharp" >}}
423423var passwordLocator = RelativeBy.WithLocator(By.TagName("input")).Below(By.Id("email"));
@@ -444,7 +444,7 @@ we can locate the cancel button element using the fact that it is a "button" ele
444444By cancelLocator = RelativeLocator.with(By.tagName("button")).toLeftOf(By.id("submit"));
445445{{< /tab >}}
446446{{< tab header="Python" text=true >}}
447- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L79 " >}}
447+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L77 " >}}
448448{{< /tab >}}
449449{{< tab header="CSharp" >}}
450450var cancelLocator = RelativeBy.WithLocator(By.tagName("button")).LeftOf(By.Id("submit"));
@@ -471,7 +471,7 @@ we can locate the submit button element using the fact that it is a "button" ele
471471By submitLocator = RelativeLocator.with(By.tagName("button")).toRightOf(By.id("cancel"));
472472{{< /tab >}}
473473{{< tab header="Python" text=true >}}
474- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L81 " >}}
474+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L79 " >}}
475475{{< /tab >}}
476476{{< tab header="CSharp" >}}
477477var submitLocator = RelativeBy.WithLocator(By.tagName("button")).RightOf(By.Id("cancel"));
@@ -500,7 +500,7 @@ but its associated [input label element](https://developer.mozilla.org/en-US/doc
500500By emailLocator = RelativeLocator.with(By.tagName("input")).near(By.id("lbl-email"));
501501{{< /tab >}}
502502{{< tab header="Python" text=true >}}
503- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L83 " >}}
503+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L81 " >}}
504504{{< /tab >}}
505505{{< tab header="CSharp" >}}
506506var emailLocator = RelativeBy.WithLocator(By.tagName("input")).Near(By.Id("lbl-email"));
@@ -526,7 +526,7 @@ You can also chain locators if needed. Sometimes the element is most easily iden
526526By submitLocator = RelativeLocator.with(By.tagName("button")).below(By.id("email")).toRightOf(By.id("cancel"));
527527{{< /tab >}}
528528{{< tab header="Python" text=true >}}
529- {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L85 " >}}
529+ {{< gh-codeblock path="examples/python/tests/elements/test_locators.py#L83 " >}}
530530{{< /tab >}}
531531{{< tab header="CSharp" >}}
532532var submitLocator = RelativeBy.WithLocator(By.tagName("button")).Below(By.Id("email")).RightOf(By.Id("cancel"));
0 commit comments