Commit d7e74997 authored by Mikael Salson's avatar Mikael Salson

vidjil_browser.rb: Get external data

Function to access external data in the Vidjil browser (for functional
tests)
parent bd2a123b
......@@ -61,6 +61,13 @@ class VidjilBrowser < Watir::Browser
menu_color.select_list.select dimension
end
# 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}
end
# 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