Commit 8accaf28 authored by Mikaël Salson's avatar Mikaël Salson

vidjil_browser.rb: Other useful functions to access scatterplot

parent d4a7c238
......@@ -170,6 +170,22 @@ class VidjilBrowser < Watir::Browser
return element(extra.merge(:id => 'fastTag'+id))
end
# Return the div of the scatterplot
def scatterplot
return element(:id => scatterplot_id)
end
def scatterplot_menu
return scatterplot.element(:class => 'sp_menu')
end
# Select a preset in the scatterplot menu
# (String or Regex)
def scatterplot_select_preset(axis)
scatterplot_menu.hover
preset_selector.select axis
end
# Return the element corresponding to the x axis of the scatterplot
def scatterplot_x
return scatterplot_axis('x')
......@@ -180,6 +196,11 @@ class VidjilBrowser < Watir::Browser
return scatterplot_legend('x', index)
end
# Return the x axis label of the scatterplot
def scatterplot_x_label
return scatterplot_labels[0]
end
# Return the element corresponding to the x axis of the scatterplot
def scatterplot_y
return scatterplot_axis('y')
......@@ -190,6 +211,11 @@ class VidjilBrowser < Watir::Browser
return scatterplot_legend('y', index)
end
# Return the y axis label of the scatterplot
def scatterplot_y_label
return scatterplot_labels[1]
end
def segmenter_checkbox_aa
return element(:id => 'segmenter_aa')
end
......@@ -306,6 +332,10 @@ class VidjilBrowser < Watir::Browser
return element(:id => scatterplot_id+'_'+axis+'_container')
end
def scatterplot_labels
return element(:id => scatterplot_id+'_axis_container').elements(:class => 'sp_legend2')
end
def scatterplot_legend(axis, index)
return scatterplot_axis(axis).element(:class => 'sp_legend', :index => index)
end
......
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