Skip to content

Commit 85f4eca

Browse files
updated with MashReq app url
1 parent de44954 commit 85f4eca

2 files changed

Lines changed: 7 additions & 8 deletions

File tree

browserstack.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ buildName: performance session
2020
# ${DATE_TIME}: Generates a Timestamp with every execution. Eg. 05-Nov-19:30
2121
# Read more about buildIdentifiers here -> https://www.browserstack.com/docs/automate/selenium/organize-tests
2222
buildIdentifier: '#${BUILD_NUMBER}' # Supports strings along with either/both ${expression}
23+
#buildIdentifier: 17
2324
# Set `framework` of your test suite. Example, `testng`, `cucumber`, `cucumber-testng`
2425
# This property is needed to send test context to BrowserStack (test name, status)
2526
framework: testng
@@ -30,7 +31,7 @@ framework: testng
3031
# Available options:
3132
# app: '/path/to/local/app.apk'
3233
# OR
33-
app: bs://9956628e64b1fe6243e24fafd2e3dec3b741a774
34+
app: bs://d9f5b1788f6e78946d4674b6733da1b05ce13f0a
3435
# Visit https://www.browserstack.com/docs/app-automate/appium/set-up-tests/specify-app for more options
3536
#app: ./WikipediaSample.apk
3637

@@ -78,6 +79,8 @@ browserstackLocal: false # <boolean> (Default false)
7879
debug: true # <boolean> # Set to true if you need screenshots for every selenium command ran
7980
networkLogs: false # <boolean> Set to true to enable HAR logs capturing
8081
consoleLogs: errors # <string> Remote browser's console debug levels to be printed (Default: errors)
82+
autoGrantPermissions: true
83+
autoAcceptAlerts: true
8184
# Available options are `disable`, `errors`, `warnings`, `info`, `verbose` (Default: errors)
8285
# Test Observability is an intelligent test reporting & debugging product. It collects data using the SDK. Read more about what data is collected at https://www.browserstack.com/docs/test-observability/references/terms-and-conditions
8386
# Visit observability.browserstack.com to see your test reports and insights. To disable test observability, specify `testObservability: false` in the key below.

src/test/java/com/browserstack/perftest/MashReqAppPerf.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.browserstack.perftest;
22

33
import io.appium.java_client.AppiumBy;
4-
import io.appium.java_client.AppiumClientConfig;
54
import io.appium.java_client.android.AndroidDriver;
65
import io.appium.java_client.android.options.UiAutomator2Options;
76
import org.openqa.selenium.JavascriptExecutor;
@@ -10,11 +9,8 @@
109
import org.openqa.selenium.support.ui.ExpectedConditions;
1110
import org.openqa.selenium.support.ui.WebDriverWait;
1211
import org.testng.ITest;
13-
import org.testng.ITestContext;
14-
import org.testng.ITestNGMethod;
1512
import org.testng.annotations.AfterMethod;
1613
import org.testng.annotations.BeforeMethod;
17-
import org.testng.annotations.DataProvider;
1814
import org.testng.annotations.Test;
1915
import java.net.URL;
2016
import java.time.Duration;
@@ -53,15 +49,15 @@ public void setUp() throws Exception {
5349

5450
}
5551

56-
//@Test(dataProvider = "testData")
52+
5753
@Test
5854
public void testApp() throws Exception {
5955
//int data=1;
6056
System.out.println("Test run "+ data);
6157

62-
WebDriverWait wait = new WebDriverWait(getDriver(), Duration.ofSeconds(30));
58+
WebDriverWait wait = new WebDriverWait(getDriver(), Duration.ofSeconds(90));
6359
WebElement searchElement = (WebElement) wait.until(
64-
ExpectedConditions.elementToBeClickable(AppiumBy.accessibilityId("Search Wikipedia")));
60+
ExpectedConditions.elementToBeClickable(AppiumBy.xpath("//android.widget.TextView[@text=\"Sign In\"]/parent::android.widget.Button")));
6561

6662
searchElement.isDisplayed();
6763

0 commit comments

Comments
 (0)