Selenium Interpreter
Upcoming SlideShare
Loading in...5
×
 

Selenium Interpreter

on

  • 1,573 views

 

Statistics

Views

Total Views
1,573
Views on SlideShare
1,564
Embed Views
9

Actions

Likes
0
Downloads
37
Comments
0

3 Embeds 9

http://melbournepatterns.org 7
http://melbournepatterns.wordpress.com 1
http://www.slideshare.net 1

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Selenium Interpreter Selenium Interpreter Presentation Transcript

    • Interpreter Pattern Inside Selenium Core David Kemp, March 2008
    • Talk Outline
      • Description of the Interpreter Pattern
      • Introduction to Selenium
      • Selenium’s Design
      • Selenium’s usage of Interpreter
    • Interpreter Pattern
      • Represent instances of a grammar using object composition.
      • Note: It does NOT address parsing.
    • Example from Kerievsky
    • Example Continued…
      • Price < 43 AND NOT Colour = Blue
    • Selenium
      • Web Testing Tool
      • Free and Open Source
      • Developed by ThoughtWorks and “Friends”
      • Recorders Exist
      • Can be driven by: Java, .NET, Perl, PHP, Python, Ruby, and HTML .
    • Selenium Core
    • Selenium Remote Control browser.open(&quot;http://www.google.com/webhp?hl=en&quot;); browser.type(&quot;q&quot;, &quot;hello world&quot;); browser.click(&quot;btnG&quot;); browser.waitForPageToLoad(&quot;5000&quot;); assertEquals(&quot;hello world - Google Search&quot;, browser.getTitle());
    • Selenium Remote Control
    • Grammar for assert, verify, store, and waitFor commands Example Commands: assertValue, assertNotValue, storeValue, waitForValue, waitForNotValue, assertText, assertNotText, storeText,…, assertAttribute, assertNotAttribute, storeAttribute… etc. etc. General Form: command = {action}{accessor} | {action} Not {accessor} action = assert | verify | store | waitFor accessor = value | text | attribute | title | visible | elementPresent | textPresent …
    • Selenium HTML Runner
    • Example Command Handler: assertNotValue