File tree 2 files changed +37
-0
lines changed
2 files changed +37
-0
lines changed Original file line number Diff line number Diff line change @@ -94,6 +94,7 @@ You can find the GitHub link in the video description or you can directly browse
94
94
7 . [ Auto Download driver executables using WebDriverManager - Part 6 | తెలుగు |] ( https://youtu.be/c8KHV8Ospf4 )
95
95
8 . [ Different Locators available in Selenium WebDriver - Part 7 | తెలుగు |] ( https://youtu.be/31mPjP7VHTY )
96
96
9 . [ How to handle TextBoxes in Selenium WebDriver - Part 8 | తెలుగు |] ( https://youtu.be/nZcqUKrsFMQ )
97
+ 10 . [ How to handle basic html controls in Selenium WebDriver - Part 9 | తెలుగు |] ( https://youtu.be/H-Agz7gOrdM )
97
98
98
99
***
99
100
Original file line number Diff line number Diff line change
1
+ package com .SeleniumPractice ;
2
+
3
+ import org .openqa .selenium .By ;
4
+ import org .openqa .selenium .WebDriver ;
5
+ import org .openqa .selenium .WebElement ;
6
+ import org .openqa .selenium .chrome .ChromeDriver ;
7
+ import io .github .bonigarcia .wdm .WebDriverManager ;
8
+
9
+ /**
10
+ * @author Yadagiri Reddy
11
+ * How to handle the links,buttons,radio buttons and checkboxes using selenium webdriver?
12
+ */
13
+ public class HandleBasicHTMLControls {
14
+ public static void main (String [] args ) throws Exception {
15
+ WebDriverManager .chromedriver ().setup ();
16
+ WebDriver driver = new ChromeDriver ();
17
+ driver .manage ().window ().maximize ();
18
+ driver .get ("https://www.hyrtutorials.com/p/basic-controls.html" );
19
+ Thread .sleep (3000 );
20
+ driver .findElement (By .id ("femalerb" )).click ();
21
+ Thread .sleep (3000 );
22
+ driver .findElement (By .id ("englishchbx" )).click ();
23
+ Thread .sleep (3000 );
24
+ WebElement hindiChk = driver .findElement (By .id ("hindichbx" ));
25
+ hindiChk .click (); // check
26
+ Thread .sleep (3000 );
27
+ if (hindiChk .isSelected ())
28
+ hindiChk .click (); //uncheck
29
+ Thread .sleep (3000 );
30
+ driver .findElement (By .id ("registerbtn" )).click ();
31
+ System .out .println (driver .findElement (By .id ("msg" )).getText ());
32
+ Thread .sleep (3000 );
33
+ driver .findElement (By .linkText ("Click here to navigate to the home page" )).click ();
34
+
35
+ }
36
+ }
You can’t perform that action at this time.
0 commit comments