Commit d7e74997 authored by Mikaël Salson's avatar Mikaël Salson

vidjil_browser.rb: Get external data

Function to access external data in the Vidjil browser (for functional
parent bd2a123b
......@@ -61,6 +61,13 @@ class VidjilBrowser < Watir::Browser dimension
# Return an associative array (keys name, and value) for the following external data
def external_data(id)
item = element(:id => 'data_'+id)
return {name: item.element(:class => 'data_name').text,
value: item.element(:class => 'data_value').text.to_f}
# Return the div of the graph component
def graph(extra = {})
return element(extra.merge(:class => 'graph', :id => 'visu2'))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment