Skip to content

Commit f62c9b9

Browse files
author
srishti11010
committed
Changes for new sample app
1 parent 6878d77 commit f62c9b9

2 files changed

Lines changed: 17 additions & 16 deletions

File tree

ios/BrowserStackIOS.py

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,25 @@
1515

1616
driver = webdriver.Remote("http://" + userName + ":" + accessKey + "@hub-cloud.browserstack.com/wd/hub", desired_caps)
1717

18-
login_button = WebDriverWait(driver, 30).until(
19-
EC.element_to_be_clickable((MobileBy.ACCESSIBILITY_ID, "Log In"))
18+
text_button = WebDriverWait(driver, 30).until(
19+
EC.element_to_be_clickable((MobileBy.ACCESSIBILITY_ID, "Text Button"))
2020
)
21-
login_button.click()
21+
text_button.click()
2222

23-
email_input = WebDriverWait(driver, 30).until(
24-
EC.element_to_be_clickable((MobileBy.ACCESSIBILITY_ID, "Email address"))
23+
text_input = WebDriverWait(driver, 30).until(
24+
EC.element_to_be_clickable((MobileBy.ACCESSIBILITY_ID, "Text Input"))
2525
)
26-
email_input.send_keys("hello@browserstack.com")
27-
28-
driver.find_element_by_accessibility_id("Next").click()
26+
text_input.send_keys("hello@browserstack.com"+"\n")
27+
2928
time.sleep(5)
3029

31-
text_elements = driver.find_elements_by_xpath("//XCUIElementTypeStaticText")
32-
assert(len(text_elements) > 0)
33-
elements = filter(
34-
lambda x: x and x.__contains__("not registered on WordPress.com"),
35-
[x.text for x in text_elements]
30+
text_output = WebDriverWait(driver, 30).until(
31+
EC.element_to_be_clickable((MobileBy.ACCESSIBILITY_ID, "Text Output"))
3632
)
37-
assert(len(elements) > 0)
38-
driver.quit()
33+
34+
if text_output!=None and text_output.text=="hello@browserstack.com":
35+
assert True
36+
else:
37+
assert False
38+
39+
driver.quit()

ios/README.md

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

18-
- 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) and upload to the BrowserStack servers using the above API.
18+
- 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.
1919
- For LocalSample 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
2121

0 commit comments

Comments
 (0)