This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| pipelines: | |
| custom: | |
| run-tests: | |
| - step: | |
| name: Run api dev | |
| image: ubuntu:22.04 | |
| script: | |
| - cd tests | |
| - apt update | |
| - apt remove -y nodejs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #swipe to top | |
| def swipe_to_top(element, duration) | |
| elem = element | |
| x = elem.location.x | |
| y = elem.location.y | |
| Appium::TouchAction.swipe(start_x: x, start_y: y, duration: duration) | |
| end | |
| #when you need to just horizontally swipe carousel of elements or similar (when 2 elements are present) | |
| def swipe_horizontally(element_s, element_e, duration) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rake' | |
| require 'json' | |
| require 'cucumber/rake/task' | |
| task :ios_browserstack, [:device] do |_task, args| | |
| device = args.device | |
| ENV['DEVICE_NAME'] = device | |
| ENV['SERVER'] = 'BROWSERSTACK' | |
| puts "<< Device #{device} >>" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| case ENV['SERVER'] | |
| when 'LOCAL' | |
| ................. | |
| when 'BROWSERSTACK' | |
| case ENV['PLATFORM'] | |
| when 'ANDROID' | |
| case ENV['DEVICE_NAME'] | |
| when "SamsungS10E" | |
| caps = {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'appium_lib' | |
| username = 'User Name from Browserstack' | |
| access_key = 'Access Key from Browserstack' | |
| case ENV['SERVER'] | |
| when 'LOCAL' | |
| case ENV['PLATFORM'] | |
| when 'ANDROID' | |
| case ENV['DEVICE_NAME'] |