Class: LdsAction
- Inherits:
-
Object
- Object
- LdsAction
- Defined in:
- lib/TNR360/components/lds_action.rb
Instance Method Summary collapse
- #click ⇒ Object
-
#getIdScreen ⇒ Object
Getters.
-
#initialize(browser, action_text, idScreen = nil) ⇒ LdsAction
constructor
constructor.
- #isExist? ⇒ Boolean
-
#to_s ⇒ Object
print object.
Constructor Details
Instance Method Details
#click ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 |
# 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])..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 ⇒ Object
Getters
52 53 54 |
# File 'lib/TNR360/components/lds_action.rb', line 52 def getIdScreen @idScreen end |
#isExist? ⇒ Boolean
56 57 58 |
# File 'lib/TNR360/components/lds_action.rb', line 56 def isExist? @exists end |