13. Selenium RC
Launch RC Server
Write Your Commands
Send to RC Server
Interact with the browser
Respond to RC Server
Fetch new instructions
Repeat
14. Selenium RC
Step 1 -> RC Server relay instructions from your test program
Step 2 -> Selenium Core will execute the instructions as
javascript commands
Step 3 -> The browser will obey the instructions of Selenium
Core and relay its response to the RC Server
Step 4 -> The RC Server will receive the response of the
browser and then display the results to you
Step 5 -> RC Server will fetch the next instruction from your
test script to repeat the whole cycle
17. Headless HtmlUnit Browser
GUI-Less browser for Java programs
A way to simulate a browser for testing
http://htmlunit.sourceforge.net/gettingStarted.html
18. If you want to...
Run your tests on different browser and operating system
Third-Party
OR?
19. Selenium Grid
Distribute test execution across several machines
Save time in execution of your test suites
http://www.guru99.com/introduction-to-selenium-
grid.html
20. WebDriverJS
Asynchronous
Example : Google search [Java]
driver.get("http://www.google.com");
driver.findElement(By.name("q")).sendKeys("webdriver");
driver.findElement(By.name("btnG")).click();
assertEquals("webdriver - Google Search",
driver.getTitle());
21. WebDriverJS
Promise
An object that can execute whatever you give it after it has finished
driver.get("http://www.google.com")
.then(function() {
return driver.findElement(By.name("q")); })
.then(function(q) {
return q.sendKeys("webdriver"); })
.then(function() {
return driver.findElement(By.name("btnG")); })
.then(function(btnG) {
return btnG.click(); })
.then(function() {
return driver.getTitle(); })
.then(function(title) {
assertEquals("webdriver - Google Search", title); });
22. ControlFlow
A wrapper for Promise
It maintains a list of schedule actions
The exposed functions in WebDriverJS do not
actually do their stuff
It puts every new entry in the then callback of
the last entry of the list