-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRadioButton.java
More file actions
31 lines (21 loc) · 811 Bytes
/
RadioButton.java
File metadata and controls
31 lines (21 loc) · 811 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
//Inspect on Radio Button
package automation;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class RadioButton {
public static void main(String[] args) throws Throwable {
// TODO Auto-generated method stub
System.setProperty("webdriver.gecko.driver", "D:\\Quastech\\Software\\geckodriver-v0.30.0-win64\\geckodriver.exe");
WebDriver driver = new FirefoxDriver();
driver.get("https://demo.guru99.com/test/ajax.html");
driver.manage().window().maximize();
//Inspect yes radio button
driver.findElement(By.id("yes")).click();
Thread.sleep(2000);
//Inspect check button
driver.findElement(By.id("buttoncheck")).click();
Thread.sleep(3000);
driver.close();
}
}