Skip to content

Commit ed96c90

Browse files
authored
Merge pull request #2 from tejasshah93/master
Include app URL placeholder | update readme
2 parents 88a65ae + 76e4dfe commit ed96c90

3 files changed

Lines changed: 14 additions & 5 deletions

File tree

BrowserStack.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public static void main(String args[]) throws MalformedURLException, Interrupted
1919

2020
capabilities.setCapability("realMobile", true);
2121
capabilities.setCapability("device", "Samsung Galaxy S7");
22-
capabilities.setCapability("app", "bs://d561ad02f69d8a329e50e92471d170ed9916b671");
22+
capabilities.setCapability("app", "bs://<hashed app-id>");
2323

2424
AndroidDriver driver = new AndroidDriver(new URL("https://"+userName+":"+accessKey+"@hub.browserstack.com/wd/hub"), capabilities);
2525

LocalSample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public static void main(String[] args) throws Exception {
3939
capabilities.setCapability("browserstack.local", true);
4040
capabilities.setCapability("realMobile", true);
4141
capabilities.setCapability("device", "Samsung Galaxy S7");
42-
capabilities.setCapability("app", "bs://d561ad02f69d8a329e50e92471d170ed9916b671");
42+
capabilities.setCapability("app", "bs://<hashed app-id>");
4343

4444
AndroidDriver driver = new AndroidDriver(new URL("https://"+userName+":"+accessKey+"@hub.browserstack.com/wd/hub"), capabilities);
4545

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1-
Automate Java Samples
1+
App Automate Java Samples
22
---------------------
33

4-
This repository contains code samples from http://www.browserstack.com/automate/java. Please feel free to clone the repo and use the example code.
4+
This repository contains code for Automated Native App tests using Appium in Java. Please feel free to clone the repo and use the example code.
55

6+
## Running your tests
7+
- Do remember to switch the USERNAME and ACCESS_KEY with your own browserstack credentials.
8+
- Upload your Native App (.apk file) to BrowserStack servers using upload API:
69

7-
Do remember to switch the USERNAME and ACCESS_KEY with your own browserstack credentials.
10+
```
11+
curl -u "username:accesskey" -X POST "https://api.browserstack.com/app-automate/upload" -F "file=@/path/to/app/file/Application-debug.apk"
12+
```
13+
14+
- If you do not have an .apk file and looking to simply try App Automate, [you can download our sample app and upload](https://www.browserstack.com/app-automate/sample-apps/android/WikipediaSample.apk)
15+
to the BrowserStack servers using the above API.
16+
- Update the desired capability "app" with the App URL returned from the above API call
817

918
For frameworks integration with BrowserStack, refer to their individual repositories -
1019

0 commit comments

Comments
 (0)