Method Name
Description Example
get(url) Opens a wedriver.get("https://google.com");
getTitle() Gets the ti String title = driver.getTitle();
getCurrentUGets the URString url = driver.getCurrentUrl();
findElemenFinds a sin driver.findElement(By.id("username"));
findElemenFinds mult List<WebElement> elements = driver.findElements(By.className("items"));
sendKeys("Sends text driver.findElement(By.name("q")).sendKeys("Selenium");
click() Clicks on a driver.findElement(By.id("login")).click();
clear() Clears the driver.findElement(By.name("password")).clear();
submit() Submits a driver.findElement(By.id("search")).submit();
getText() Gets the teString text = driver.findElement(By.tagName("h1")).getText();
isDisplayedChecks if aboolean visible = driver.findElement(By.id("logo")).isDisplayed();
isEnabled()Checks if aboolean enabled = driver.findElement(By.id("submit")).isEnabled();
isSelected(Checks if aboolean selected = driver.findElement(By.name("gender")).isSelected();
getAttributGets the vaString value = driver.findElement(By.id("email")).getAttribute("value");
getCssValuGets the CSString color = driver.findElement(By.tagName("h1")).getCssValue("color");
navigate().Navigates driver.navigate().to("https://example.com");
navigate().Goes back driver.navigate().back();
navigate().Goes forwadriver.navigate().forward();
navigate().Refreshes tdriver.navigate().refresh();
manage().wMaximizes driver.manage().window().maximize();
manage().wMinimizes driver.manage().window().minimize();
manage().tSets implicdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
switchTo().Switches toAlert alert = driver.switchTo().alert();
switchTo() Switches todriver.switchTo().frame("frame1");
switchTo().Switches bdriver.switchTo().defaultContent();
switchTo() Switches bdriver.switchTo().window(handle);