Home › Selenium Automation (Java)
Element API Text input clear(), sendKeys("..."), sendKeys(Keys.ENTER) Checkbox / radio isSelected() then click() <select> new Select(el).selectByVisibleText("…") / selectByValue / selectByIndex File upload input[type=file].sendKeys(absolutePath) JS alert / confirm / prompt driver.switchTo().alert() → accept(), dismiss(), sendKeys() iframe switchTo().frame(element) … switchTo().defaultContent() New tab / window getWindowHandles(), switchTo().window(handle), switchTo().newWindow(WindowType.TAB) Shadow DOM host.getShadowRoot().findElement(By.cssSelector(...)) Read values getText(), getAttribute("value") / getDomProperty("value"), isDisplayed(), isEnabled() Custom dropdowns built from divs are not <select> — click to open, then click the option.