APICommands 1
APICommands 1
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
driver.get("https://iamsandesh23.github.io/selenium.github.io/");
driver.manage().window().maximize();
driver.findElement(By.linkText("compendiumdev")).click();
System.out.println(str);
}
}
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
driver.get("http://www.msn.com");
driver.manage().window().maximize();
driver.close();
}
}
• quit() - Used to close all the Browser windows (i.e. All the browser
windows, including child windows, will be closed)
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
driver.get("https://iamsandesh23.github.io/selenium.github.io/");
driver.manage().window().maximize();
driver.findElement(By.linkText("Blogger")).click();
driver.quit();
}
}