Skip to main content
deleted 44 characters in body
Source Link
NarendraR
  • 1.6k
  • 1
  • 17
  • 35

Use the below code

WebDriverWait wait=new WebDriverWait(driver,10);
wait.until(ExpectedConditions.elementToBeClickable(By.cssSelector("div>input[type='radio'][name='selectToInsertTemplate']""div>label[class='control-label']"))).click();

OR can use javascriptExecutor

WebElement radio = driver.findElement(By.cssSelector("div>input[type='radio'][name='selectToInsertTemplate']""div>label[class='control-label']"));

JavascriptExecutor js = (JavascriptExecutor)driver;
js.executeScript("arguments[0].click();", element);

Use the below code

WebDriverWait wait=new WebDriverWait(driver,10);
wait.until(ExpectedConditions.elementToBeClickable(By.cssSelector("div>input[type='radio'][name='selectToInsertTemplate']"))).click();

OR can use javascriptExecutor

WebElement radio = driver.findElement(By.cssSelector("div>input[type='radio'][name='selectToInsertTemplate']"));

JavascriptExecutor js = (JavascriptExecutor)driver;
js.executeScript("arguments[0].click();", element);

Use the below code

WebDriverWait wait=new WebDriverWait(driver,10);
wait.until(ExpectedConditions.elementToBeClickable(By.cssSelector("div>label[class='control-label']"))).click();

OR can use javascriptExecutor

WebElement radio = driver.findElement(By.cssSelector("div>label[class='control-label']"));

JavascriptExecutor js = (JavascriptExecutor)driver;
js.executeScript("arguments[0].click();", element);
Source Link
NarendraR
  • 1.6k
  • 1
  • 17
  • 35

Use the below code

WebDriverWait wait=new WebDriverWait(driver,10);
wait.until(ExpectedConditions.elementToBeClickable(By.cssSelector("div>input[type='radio'][name='selectToInsertTemplate']"))).click();

OR can use javascriptExecutor

WebElement radio = driver.findElement(By.cssSelector("div>input[type='radio'][name='selectToInsertTemplate']"));

JavascriptExecutor js = (JavascriptExecutor)driver;
js.executeScript("arguments[0].click();", element);