Submitted by harrydev on Sat, 12/27/2014 - 12:57
We can use WebDriverWait class in many different cases. When ever we need to perform any operation on element, we can use webdriver wait to check if the element is Present or visible or enabled or disabled or Clickable etc.
We will look into different examples for all the above scenarios:
Submitted by harrydev on Sat, 12/27/2014 - 11:11
We have taken example program to perform drag and drop. In the below example, as the DragAndDrop divs are in a Frame, First we need to switch to the frame before performing drag and drop. And then we also need to check for the availability of SourceElement and DestinationElements.
Syntax for drag and drop
Actions action = new Actions(driver);
We can also make it as below:
(new Actions(driver)).dragAndDrop(element, target).perform();
Submitted by harrydev on Sat, 12/27/2014 - 02:33
Submitted by harrydev on Sat, 12/27/2014 - 02:04
We have seen working with checkboxes with different examples to select and de-select the checkboxes using selenium webdriver Select class Now in this tutorial we will working with multiple checkboxes.
There are cases were we need to select multiple checkboxes or de-select multiple checkboxes. Below is the sample code to work with multiple checkboxes.
Submitted by harrydev on Sat, 12/27/2014 - 00:11
In order to perform a 'mouse hover' action, we need to take the help of Selenium Actions class. Which we have seen earlier Mouse Hover with Actions class
Submitted by harrydev on Sat, 12/20/2014 - 22:32
Page Object Model Framework has now a days become very popular test automation framework in the industry and many companies are using it because of its easy test maintenance and reduces the duplication of code.
The main advantage of Page Object Model is that if the UI changes for any page, it don’t require us to change any tests, we just need to change only the code within the page objects (Only at one place). Many other tools which are using selenium, are following the page object model.
Submitted by harrydev on Sun, 12/14/2014 - 07:13
There are cases where we need to open new window and perform operations or there may be cases where after clicking on any button / link, it opens new window and need to perform operations on the new window.
Let us look into such example:
Test case: We need to open 'http://linkedin.com' and click on 'Help Center' link at the bottom which will open new window.
1. Verify the title of the new window
2. Verify text 'Welcome' on the page.
3. Search for a Question with text "Frequently Asked Questions" and verify the result.
Submitted by harrydev on Sun, 12/14/2014 - 01:59
As we know we cannot simulate OS actions with Selenium. We use AutoIt tool to upload documents (when it is not possible to achive upload using sendKeys method). We have discussed uploading a file using using Webdriver Sendkeys method and Using AutoIT Tool in earlier tutorials.
Submitted by harrydev on Sat, 12/13/2014 - 23:32
Submitted by harrydev on Fri, 12/12/2014 - 23:38
As we have seen earlier WebDriver’s support classes called “Select”, which provides useful methods for interacting with select options. User can perform operations on a select dropdown and also de-select operation using select methods.
We will now show you how to work with select methods using examples tests. We have created a common resuables which can be used across the tests.
Below is the sample test with three test methods. Each with a different example.