Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ios/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
curl -u "username:accesskey" -X POST "https://api.browserstack.com/app-automate/upload" -F "file=@/path/to/app/file/Application-debug.ipa"
```

- If you do not have an .ipa file and looking to simply try App Automate, you can download our [sample app](https://www.browserstack.com/app-automate/sample-apps/ios/WordPressSample.ipa)
- If you do not have an .ipa file and looking to simply try App Automate, you can download our [sample app](https://www.browserstack.com/app-automate/sample-apps/ios/BStackSampleApp.ipa)
and upload to the BrowserStack servers using the above API.
- For running local tests, you can use our [local sample app](https://www.browserstack.com/app-automate/sample-apps/ios/LocalSample.ipa).
- Update the desired capability "app" with the App URL returned from the above API call
Expand Down
26 changes: 13 additions & 13 deletions ios/single_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,23 +21,23 @@
driver = appium_driver.start_driver

wait = Selenium::WebDriver::Wait.new(:timeout => 30)
wait.until { driver.find_element(:accessibility_id, "Log In").displayed? }
login_button = driver.find_element(:accessibility_id, "Log In")
login_button.click

wait.until { driver.find_element(:accessibility_id, "Email address").displayed? }
email_input = driver.find_element(:accessibility_id, "Email address")
email_input.send_keys("hello@browserstack.com")

wait.until { driver.find_element(:accessibility_id, "Next").displayed? }
driver.find_element(:accessibility_id, "Next").click
wait.until { driver.find_element(:accessibility_id, "Text Button").displayed? }
textButton = driver.find_element(:accessibility_id, "Text Button")
textButton.click

wait.until { driver.find_element(:accessibility_id, "Text Input").displayed? }
textInput = driver.find_element(:accessibility_id, "Text Input")
textInput.send_keys("hello@browserstack.com"+"\n")

sleep 5

wait.until { driver.find_element(:accessibility_id, "Text Output").displayed? }
result = driver.find_element(:accessibility_id, "Text Output")

results = driver.find_elements(:xpath, "//XCUIElementTypeStaticText")
if results.map(&:text).any?{|x| !x.nil? && x.match('not registered on WordPress.com')}
if (!result.nil?) && (result.text.eql? "hello@browserstack.com")
puts "Test Passed"
else
puts "Test Failed"
end

driver.quit
driver.quit