Skip to content

Commit bb5f35d

Browse files
authored
Merge pull request #6 from browserstack/new_sample_app
Changes for new sample app
2 parents 2628fee + 54a3248 commit bb5f35d

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

ios/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
curl -u "username:accesskey" -X POST "https://api.browserstack.com/app-automate/upload" -F "file=@/path/to/app/file/Application-debug.ipa"
1515
```
1616

17-
- 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)
17+
- 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)
1818
and upload to the BrowserStack servers using the above API.
1919
- For running local tests, you can use our [local sample app](https://www.browserstack.com/app-automate/sample-apps/ios/LocalSample.ipa).
2020
- Update the desired capability "app" with the App URL returned from the above API call

ios/single_test.rb

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,23 @@
2121
driver = appium_driver.start_driver
2222

2323
wait = Selenium::WebDriver::Wait.new(:timeout => 30)
24-
wait.until { driver.find_element(:accessibility_id, "Log In").displayed? }
25-
login_button = driver.find_element(:accessibility_id, "Log In")
26-
login_button.click
27-
28-
wait.until { driver.find_element(:accessibility_id, "Email address").displayed? }
29-
email_input = driver.find_element(:accessibility_id, "Email address")
30-
email_input.send_keys("hello@browserstack.com")
31-
32-
wait.until { driver.find_element(:accessibility_id, "Next").displayed? }
33-
driver.find_element(:accessibility_id, "Next").click
24+
wait.until { driver.find_element(:accessibility_id, "Text Button").displayed? }
25+
textButton = driver.find_element(:accessibility_id, "Text Button")
26+
textButton.click
27+
28+
wait.until { driver.find_element(:accessibility_id, "Text Input").displayed? }
29+
textInput = driver.find_element(:accessibility_id, "Text Input")
30+
textInput.send_keys("hello@browserstack.com"+"\n")
31+
3432
sleep 5
33+
34+
wait.until { driver.find_element(:accessibility_id, "Text Output").displayed? }
35+
result = driver.find_element(:accessibility_id, "Text Output")
3536

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

43-
driver.quit
43+
driver.quit

0 commit comments

Comments
 (0)