class LdsAction
Public Class Methods
new(browser,action_text,idScreen=nil)
click to toggle source
constructor
# File lib/TNR360/components/lds_action.rb, line 10 def initialize(browser,action_text,idScreen=nil) @browser =browser @action_text=action_text @idScreen=idScreen @exists end
Public Instance Methods
click()
click to toggle source
# File lib/TNR360/components/lds_action.rb, line 17 def click action_path = @action_text.split('/') raise "Provide at least one level of action item" if (action_path.length < 1) for i in 0..(action_path.length-1) puts "Value of local variable is #{i}" case i when 0 @browser.table(:id => action_path[i]).button.when_present.click sleep($small_wait_time) when 1 @browser.a(:id=> action_path[i]).when_present.click sleep($small_wait_time) when i==action_path.length-1 @browser.a(:id=>action_path[i]).when_present.click sleep($small_wait_time) else @browser.a(:id=>action_path[i]).when_present.hover sleep($small_wait_time) if i==action_path.length-1 @browser.a(:id=>action_path[i]).when_present.click end end end end
getIdScreen()
click to toggle source
Getters
# File lib/TNR360/components/lds_action.rb, line 52 def getIdScreen @idScreen end
isExist?()
click to toggle source
# File lib/TNR360/components/lds_action.rb, line 56 def isExist? @exists end
to_s()
click to toggle source
print object
# File lib/TNR360/components/lds_action.rb, line 44 def to_s "\n***** Button *****"+ "\nAction text : "+ no_null(@action_text)+ "\nIdScreen : "+ no_null(@IdScreen) + "\nExists : "+ no_null(@exists.to_s)+ "\n**********" end