Selenium Interpreter

  • 1,078 views
Uploaded on

 

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,078
On Slideshare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
37
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Interpreter Pattern Inside Selenium Core David Kemp, March 2008
  • 2. Talk Outline
    • Description of the Interpreter Pattern
    • Introduction to Selenium
    • Selenium’s Design
    • Selenium’s usage of Interpreter
  • 3. Interpreter Pattern
    • Represent instances of a grammar using object composition.
    • Note: It does NOT address parsing.
  • 4. Example from Kerievsky
  • 5. Example Continued…
    • Price < 43 AND NOT Colour = Blue
  • 6. 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 .
  • 7. Selenium Core
  • 8. 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());
  • 9. Selenium Remote Control
  • 10. 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 …
  • 11. Selenium HTML Runner
  • 12. Example Command Handler: assertNotValue