appium-android

how to Make selectable appPackage and appActivity BeforeScenario in android Appium Test Automation

吃可爱长大的小学妹 提交于 2020-02-06 08:01:34
问题 I want to choose starting app(appPackage,appActivity) in @BeforeScenario to develop a test scenarios for multiple apps in one test project. I know use the start activity but because of security permission denial, I can not use it. The only working method is using capabilities in beforeScenario. Before start the test I want to choose the starting app.My Code: `@BeforeScenario public void beforeScenario() throws MalformedURLException { DesiredCapabilities desiredCapabilities = new

Appium is unable to find button on android device

你。 提交于 2020-01-25 06:52:48
问题 The following is the html code for the button that I'm trying to click. <Button rounded style={styles.pickBtn} title="get started" onPress={signIn} testID="completeBoarding"> <Text style={styles.pickBtnText}>GET STARTED</Text> </Button> This is the code that I have tried to use to click on said button. String xPath = "//button[normalize-space()='GET STARTED']"; AndroidElement searchElement = (AndroidElement) new WebDriverWait(driver, 30).until( ExpectedConditions.elementToBeClickable(MobileBy

Can not able to find elements of drop-down

前提是你 提交于 2020-01-16 19:47:07
问题 I'm trying to write automated test cases of Cordova hybrid app using appium on android platform but I'm not able to find elements of the drop-down. this is the image of my application screen. and the page source of this drop-down is : <android.view.View index="2" text="Captain Marvel Thor Iron Man Captain America Hulk Adam Warlock" class="android.view.View" package="com.cisco.iot.kinetic" content-desc="" checkable="false" checked="false" clickable="true" enabled="true" focusable="true"

Appium: Getting error “Failed to start Chromedriver session, Original error: unknown error: Failed to get PID for the following process”

你离开我真会死。 提交于 2020-01-06 13:14:25
问题 Got this error when I tested an Android build "internal" flavor, I believe the problem is a mismatch in package and process name of our Android application build which could have to happen when the package name changed due to the "internal" flavor. I'm still looking into how to fix this and I can find any relevant cases here and while searching on the web. I'll keep looking and trying fixes but if anyone has an idea or solution pls. let me know. 回答1: Findings : Turns out that Android creates

Appium: Getting error “Failed to start Chromedriver session, Original error: unknown error: Failed to get PID for the following process”

左心房为你撑大大i 提交于 2020-01-06 13:14:08
问题 Got this error when I tested an Android build "internal" flavor, I believe the problem is a mismatch in package and process name of our Android application build which could have to happen when the package name changed due to the "internal" flavor. I'm still looking into how to fix this and I can find any relevant cases here and while searching on the web. I'll keep looking and trying fixes but if anyone has an idea or solution pls. let me know. 回答1: Findings : Turns out that Android creates

Unable to tap the link after tap on Allow button of permission alert in Appium?

北战南征 提交于 2020-01-06 06:35:47
问题 I'm automating an Android App using Appium. The issue I'm facing is it doesn't perform any action after tabbing on allow button of Contact Access Permission as shown in below Image : I've tried below code for the same : @Test public void doLogin() { driver.findElement(By.id("com.rawalinfocom.rcontact:id/text_next")).click(); // Clicks on Allow Button driver.findElement(By.id("com.android.packageinstaller:id/permission_allow_button")).click(); // Clicks on Skip link driver.findElement(By.id(

Swipe funtion in Andriod for Java-Client-5.0.3 is not working

你说的曾经没有我的故事 提交于 2019-12-25 02:23:08
问题 I was using below code for page swiping in Android Mobile Automation Testing, the swipe function is not supported. It gives the error: The method swipe(int, int, int, int, int) is undefined for the type AppiumDriver Below is the code public static void Swipe(String Direction) throws Exception,IOException{ if(Direction.equalsIgnoreCase("Right to Left")){ AgenceGS_Framwork.driver.context("NATIVE_APP"); Dimension size = AgenceGS_Framwork.driver.manage().window().getSize(); int startx = (int)

Appium TestNG - How to identify an element in other languages

时光总嘲笑我的痴心妄想 提交于 2019-12-24 07:39:21
问题 i´m using Appium/TestNG in real devices to automate an application, but some elements have the [@text='string'] with other languages. what´s the best solution to use the same code on other languages instead of creating one code for each language ? 回答1: Best practice is to never use XPath locators like //*[@text='string'] For Android apps use resource-id or uiautomator locator strategies For iOS apps accessibility-id or ios class chain locator strategies It will help to keep your tests stable

Error while trying out touch actions using Appium

限于喜欢 提交于 2019-12-24 01:22:07
问题 Below is my code: package AppiumPackage; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.interactions.touch.TouchActions; import org.openqa.selenium.remote.Augmenter; import org.openqa.selenium.remote.DesiredCapabilities; import org.openqa.selenium.remote.RemoteWebDriver; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; import org.testng.Assert;

Appium Test Android

江枫思渺然 提交于 2019-12-13 09:47:03
问题 Automating Test using Appium I am Following This Two Tutorials https://www.youtube.com/watch?v=n8QqYAXKWEU https://www.youtube.com/watch?v=AlBrQ_-phsQ org.gradle.execution.MultipleBuildFailures: Build completed with 1 failures. at org.gradle.initialization.DefaultGradleLauncher$ExecuteTasks.run(DefaultGradleLauncher.java:358) at org.gradle.internal.operations.DefaultBuildOperationExecutor$RunnableBuildOperationWorker.execute(DefaultBuildOperationExecutor.java:300) at org.gradle.internal