Skip to content

Commit fc7deff

Browse files
committedApr 30, 2021
Selenium Java in Telugu course updated
1 parent 3a0db72 commit fc7deff

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed
 

‎README.md

+1
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ You can find the GitHub link in the video description or you can directly browse
9494
7. [Auto Download driver executables using WebDriverManager - Part 6 | తెలుగు |](https://youtu.be/c8KHV8Ospf4)
9595
8. [Different Locators available in Selenium WebDriver - Part 7 | తెలుగు |](https://youtu.be/31mPjP7VHTY)
9696
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)
9798

9899
***
99100

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
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+
}

0 commit comments

Comments
 (0)
Please sign in to comment.