Driver Initialization
Selenium Locators
ISTQB Advanced Test Automation EngineeringSelenium Q&AFind element VS Find elements
Handle alerts: (Web-based alert pop-ups)
Page Loading Strategy
The document.readyState property of a document describes the loading state of the current document. By default, WebDriver will hold off on responding to a driver.get() (or) driver.navigate().to() call until the document ready state is complete By default, when Selenium WebDriver loads a page, it follows the normal pageLoadStrategy. Cookies
Take screenshot
getScreenshotAs — used to Capture the screenshot and store it in the specified location. This method throws WebDriverException. copy() method from the File Handler class is used to store the screenshot in a destination folder. Code Example: TakesScreenshot screenShot =(TakesScreenshot)driver; FileHandler.copy(screenShot.getScreenshotAs(OutputType.FILE), new File("path/to/destination/folder/screenshot.png")); Execute Javascript
Code Example: if (driver instanceof JavascriptExecutor) { ((JavascriptExecutor)driver).executeScript("alert('hello world');"); } Annotations
Selenium Exceptions
|
Keyboard and Mouse events
Code Example: Actions builder = new Actions(driver); Action actions = builder .moveToElement("login-textbox") .click() .keyDown("login-textbox", Keys.SHIFT) .sendKeys("login-textbox", "hello") .keyUp("login-textbox", Keys.SHIFT) .doubleClick("login-textbox") .contextClick() .build(); actions.perform() ; Element validation
Handle multiple windows and tabs
Switch Frames
Materials
Get methods in Selenium
Navigation
Desired Capabilities-ChromeDesiredCapabilities caps = new DesiredCapabilities(); caps.setCapability(“browserName”, “chrome”); caps.setCapability(“browserVersion”, “80.0””); caps.setCapability(“platformName”, “win10”); WebDriver driver = new ChromeDriver(caps); // Pass the capabilities as an argument to the driver object Desired Capabilities-FirefoxDesiredCapabilities caps = new DesiredCapabilities(); caps.setCapability(“browserName”, “firefox”); caps.setCapability(“browserVersion”, “81.0””); caps.setCapability(“platformName”, “win10”); WebDriver driver = new FirefoxDriver(caps); // Pass the capabilities as an argument to the driver object Practice Scripts
|
apache apache testing testing testing testing testing ide browser server java java software framework framework framework framework data data firefox firefox automation pdf builder keyword is is what what by xpath xpath xpath xpath interview interview online point selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium selenium jenkins in in in in in in in tutorial tutorial tutorial tutorial tutorial tutorial example questions questions architecture annotations training training training training training assert testng testng testng testng webdriver webdriver webdriver webdriver webdriver webdriver webdriver webdriver webdriver webdriver webdriver webdriver webdriver webdriver webdriver webdriver webdriver webdriver webdriver webdriver download download download download download download wait wait qtp qtp guru99 guru99 guru99 guru99 driven driven driven standalone javascriptexecutor locators toolsqa toolsqa cross using chromedriver chromedriver chromedriver appium appium poi poi tutorialspoint tutorialspoint tutorialspoint tutorials javatpoint javatpoint arun gc reddy fluentwait org-openqa-selenium-firefox-notconnectedexception org-openqa-selenium-firefox-notconnectedexception seleniumwebdrivertutorial webdriverinselenium webdriverselenium seleniumide seleniumwebdriverjava seleniumjava seleniumwebdriver seleniumtutorialpdf seleniumtutorial seleniumwebdriverdownload seleniumdownload seleniumwebdriverexample whatiswebdriver xpathinselenium seleniumframework webdriverwait waitinselenium assertinselenium seleniumwebdrivertraining seleniumtesting seleniumtrainingonline seleniuminterviewquestions seleniumautomationtraining softwaretestingtraining qtpselenium qtptraining guru99selenium guru99seleniumwebdriver testinginterviewquestions testngframework datadrivenframework seleniumwebdriverarchitecture datadriventesting seleniumserverstandalone javascriptexecutorinselenium locatorsinselenium keyworddrivenframework whatisxpath testngannotations seleniumbuilder crossbrowsertesting usingseleniumwebdriver downloadseleniumwebdriver downloadselenium webdrivertutorial webdriverdownload seleniumfirefox webdriverfirefox seleniumchromedriver apachepoi seleniumwebdrivertutorials tutorialspointselenium seleniumtutorialpoint seleniumbyarun apachepoidownload jenkinstutorial gcreddyselenium fluentwaitinselenium
Created By
Metadata
Favourited By
Comments
No comments yet. Add yours below!
Add a Comment
Related Cheat Sheets
More Cheat Sheets by Narayanan Palani