Sha256: 4f6000df995c514e039dce6641b288f3c6f702eeb7e7a205fa3442f2f5a2870e

Contents?: true

Size: 1.75 KB

Versions: 1

Compression:

Stored size: 1.75 KB

Contents

Given(/^I have App running with appium$/) do
 # Make sure you have started appium server
end

# Wait for the specific time
When /^I wait for (\d+) seconds$/ do |second|
  sleep(second.to_i)
end

And /^I input text "(.*)" on "(.*)"$/ do |text,object|
  execute_settext(object,text)
end

And /^I click on "(.*)"$/ do |object|
  execute_click object
end

Then /^I verify property "(.*)" with "(.*)" has( | not)? value "(.*)"$/ do |object, property, negate, value|
  sleep(0.5)
  value = var_collect(value)
  execute_checkproperty(object, property, negate, value)
end

Given /^I click on element with x: "(.*)", y: "(.*)"$/ do |x,y|
  click_by_coordinate x,y
end

And /^I scroll the screen from startX (\d+) startY (\d+) to endX (\d+) endY (\d+) and millisecond timeout is (\d+)$/ do |startX, startY, endX, endY, timeout|
  selenium.swipe(startX:startX, startY:startY, endX:endX,endY:endY, duration:timeout)
end

Given /^I get attribute of element "(.*)"$/ do |element|
  found_element = find_object element
  actual_value = found_element.attribute("name")
  puts actual_value
end

And /^I rotate device to (landscape|portrait)$/ do |type|
  case type.to_sym
    when :landscape
      $driver.rotate :landscape
    when :portrait
      $driver.rotate :portrait
    else
      raise "ERROR: *** unknown rotate type"
  end
end

And /^I accept alert$/ do
  selenium.alert_accept
end

And /^I dismiss alert$/ do
  selenium.alert_dismiss
end

And /^I hide the keyboard$/ do
  selenium.hide_keyboard
end

And /^I delete an character$/ do
  system('adb shell input keyevent 67')
end

And /^I test "(.*)"$/ do |element|
  found_element = find_object element
  actual_value = found_element.attribute("value")
  puts actual_value
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
Ifd_Mobile-0.1.1 lib/Ifd_Mobile/lib_web.rb