Sample JAVA Code:
public class RunBat {
public static void main(String[] args) throws IOException, InterruptedException{
Runtime runtime = Runtime.getRuntime();
Process process = runtime.exec("cmd /c F:\\bb.bat");
process.waitFor();
}
}
Advanced Selenium Training with Java, C#- Batch Starting from 2nd Week
Manual Testing Training- Batch Starting from 2nd Week
JMeter Training- Batch Starting from 2nd Week
Have any query, click here and write your question?
Want to contribute in this blog, email me.
// How to automate CheckBox/RadioButton
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class CheckBox {
public static void main(String[] args) throws InterruptedException {
WebDriver driver = new FirefoxDriver();
String Url = "https://www.facebook.com/";
driver.get(Url);
Boolean select = driver.findElement(By.xpath("//*[@id='persist_box']")).isSelected();
if (select == false)
{
driver.findElement(By.xpath("//*[@id='persist_box']")).click();
}
Thread.sleep(5000);
driver.close();
}
}