Tags » WebDriver

Difference between webdriver.get() and webdriver.navigate()

Driver.get(“URL”):when we call this function it will open a browser with provided URL and it will wait till our page is not loaded  (if we have Ajax in our page then we need to use wait) but there is drawback with this method if we want to browser back, browser forward  ,or need to refresh then we can not do it with this method we need to use driver. 193 more words

Basic Selenium

File Uploading in Selenium

While using selenium WebDriver, sometimes we need to upload a file for various .When we click the button, a dialog box appears and we have to select a file to upload. 334 more words

Basic Selenium

Significance of alwaysRun=true @Test annotation property.

alwaysRun=true property informs the system that TestNg should run the test method if depends on @Test method fails also. Basically it helps to achieve the soft dependency, the feature of TestNG which helps to execute the testng test methods in order. 21 more words

My Technical View

How to Launch Chrome browser with Selenium WebDriver?

Before thinking how we can run the our application on Chrome browser, download the ChromeDriver from here.

To lunch chrome browser with Selenium Webdriver takes less than a minute and 3 lines of code. 23 more words

My Technical View

Setup Selenium 2 WebDriver project in IntelliJ from scratch

  1. Mac machine:
    1. Download and install Java JDK for MAC http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html .
      1. The default installation folder on MAC would be /Library/Java/JavaVirtualMachines/jdk1.8.0_{VERSION_NUMBER}.jdk/Contents/Home
      2. Set JAVA_HOME in terminal: export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_{VERSION_NUMBER}.jdk/Contents/Home…
  2. 391 more words

How to take a screenshot

When we are executing our scripts, ScreenShot of a webpage is taken in case some test fails
and need to find what went wrong. “TakesScreenshot” and “getScreenShotAs” methods are used to the take the screen shot in a file. 137 more words

Basic Selenium

How to switch between windows

There is always a unique id called window handle assigned to each window as soon as the WebDriver object is instantiated. WebDriver uses this id to switch among different windows. 135 more words

Basic Selenium