Dashboard > Selenium Remote Control > ... > Developer's Guide > Selenium RC Anatomy
Selenium Remote Control Log In View a printable version of the current page.
Selenium RC Anatomy
Added by Shane, last edited by Shane on Apr 29, 2008  (view change)
Labels: 
(None)

This is still a draft based on a personal understanding. Selenium RC developers should confirm this before it is final.

Parts Involved

There are four main processes involved in the run of a Selenium RC test, test code (using Ruby as example here), selenium server instance, testing browser instance, and web application under test

Code

@sel = Selenium::SeleniumDriver.new("localhost", 4444, "*chrome", "http://www.google.com", 15000)
@sel.start
@sel.open("http://www.google.com")
@sel.type("q", "hello world")
...
@sel.stop

Sequence Chart

Here is a poor man's version of the sequence diagram for a Selenium test run in Ruby

Ruby test code Data Flow Selenium Server Data Flow Browser
    running    
@sel = ...new..        
@sel.start --->      
    starts browser --->  
    waits   starts
      <--- connects to selenium server
  <--- returns new session id    
(stores session id)        
@sel.open        
(sends open command
with session id)
-->      
    forwards command as reply to browser ---->  
        selenium core processes command, performs the action
      <--- sends result as another request in the same session
    processes result    
  <--- sends result back to test process    
@sel.type        
(sends type command
with session id and arguments)
-->      
    forwards command as reply to browser ---->  
        selenium core processes command, performs the action
      <--- sends result as another request
    processes result    
  <--- sends result back to test process    
...        
...        
@sel.stop        
(sends type command
with session id)
-->      
    shuts down browser    
  <--- ends sessions    
...        

Site running on a free Atlassian Confluence Community License granted to OpenQA. Evaluate Confluence today.
Powered by Atlassian Confluence, the Enterprise Wiki. (Version: 2.5.6 Build:#812 Aug 06, 2007) - Bug/feature request - Contact Administrators