Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
vidjil
vidjil
Commits
8accaf28
Commit
8accaf28
authored
Feb 20, 2017
by
Mikaël Salson
Browse files
vidjil_browser.rb: Other useful functions to access scatterplot
parent
d4a7c238
Changes
1
Hide whitespace changes
Inline
Side-by-side
browser/test/vidjil_browser.rb
View file @
8accaf28
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment