Into Cloud with SauceLabs

If you don’t want to spend your time and resources developing and maintaining your own infrastructure, you can use 3rd party cloud service like BrowserStack or SauceLabs. Both companies made it easy for its customers to run automation against their … Read the rest

WebDriver the Middle-Man

Automation script gives browser command to simulate user behaviors, but how they 2 talk and understand each other? It is with Selenium’s webdriver and language-binding as intepreters:

Figure 1: WebDriver Architecture

Every browser has its own automation interface that allows … Read the rest

2 school of Drivers

two groups of driver implementations:

  • Use browser’s native command to driver browser:FirefoxDriver, InternetExplorerDriver, ChromeDriver and OperaDriver invoke the actual browser installed on the machine;
  • Synthetic command to simulate browser behavior: HtmlUnitDriver emulates other browsers JS behavior.
    HtmlUnit is a wrapper
Read the rest

Locate Element(s)

How can an web element be located? To understand that, we need to first understand HTML, the language for creating web pages. If you are not familiar with HTML, learn it from here.

we can take a look at … Read the rest

Gauge vs Cucumber

I am a fan of ThoughtWorks. So I have to try it when they roll out this new tool called Gauge.

Gauge is very similar to ‘Cucumber’. They both are BDD tools intended to give business people a chance to … Read the rest

Selenium and Cucumber

What is Cucumber?
Cucumber is a tool invented based on BDD concept: Software development/testing should be managed by both business interests and technical insight.

To make a tool easy to understand by non-technical people, we need to add a layer … Read the rest

Selenium and Protractor

Protractor: an end-to-end test framework for Angular and AngularJS applications. It is built on top of Selenium’s WebDriverJS for AngularJS applications, and thus can handle angular-specific characteristics.

What is so special about Protractor

  • Protractor uses native events and browser-specific
Read the rest

Check Ajax Call Status

We will use JQuery to check ajax status . So if JQuery is not included in your web page, inject JQuery into your page using following code:

/** dynamically load jQuery */
public static void injectJQuery(WebDriver driver){
String LoadJQuery =
Read the rest

Access Shadow DOM Elements

What is Shadow DOM
Shadow DOM is an emerging standard for encapsulating DOM and styling, with composition. In another word: via Shadow DOM a Web Developer can hide details of certain web component from peer developers. The developer cannot access … Read the rest

Execute Javascript

Sometimes we run into problems that we cannot solve with selenium webdriver commands alone, such as:

  • interacting with shadow DOM elements,
  • scroll page,
  • inject JQuery library into page for convenient ajax status checking
  • and many more

and we have to … Read the rest