How To Click on Radio Button in Selenium Webdriver

How to Click radio button in Selenium? 

How To Click on Radio Button in Selenium Webdriver using java


Click();

Click Method :  In Selenium Click method used to to click on radio Button 

Syntax : 


driver.findElement(By.className("_8esa")).click();

Selenium Code for clicking on radio Button using java



package firstpackage;
 import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class FirstProgram
 {
public static void main(String[] args)
 {
System.setProperty("webdriver.chrome.driver", "C:\\Software\\Chrome Driver\\chromedriver_win32 (1)\\chromedriver.exe");
              
WebDriver driver=new ChromeDriver();
driver.manage().window().maximize();
driver.get("https://www.facebook.com");
driver.findElement(By.className("_8esa")).click();
}
}

The above code is example of how to select radio button in selenium , In this code we have write the code to Select the female radio button from the facebook signup form 

How To Click on Radio Button in Selenium Webdriver 

Hope !!! The above Code " how to click radio button in selenium using java " is helpful For you ...
Team 
QA acharya

Tags: clicking radio button in selenium , how to click radio button in Selenium , how to select the radio button in selenium , Selecting the radio button in selenium wbdriver using java
Related Post: 


Post a Comment

0 Comments