appium

Andriod APP自启动脚本:Appium+Python

♀尐吖头ヾ 提交于 2019-12-11 05:50:23
Andriod APP自启动脚本:Appium+Python 注意:环境配置这里不做赘述 Appium 启动APP至少需要5个参数,分别是'platformName','platformVersion','deviceName'、'appPackage'、'appActivity' 一、获取这五个参数 方法:使用真机或者模拟器(夜神模拟器) (1)、platformName,Android app自动化测试,所以这个platformName值就是android; (2)、platformVersion就是Android版本号,可以通过查看手机设置得出,或者查看模拟器的设置(夜神模拟器的Android的版本号要在夜神多开器里查看) (3)、deviceName就是我们连接的手机名称 手机通过USB线连接电脑,打开开发者模式,打开USB调试功能,使用adb命令adb devices查看设备名称。 LGH81868ba33ec 这串东西就是我们要的deviceName了 有些人可能是用虚拟器来做自动化测试,如果是用虚拟器的话,那这里就要填写虚拟器的设备名称(手机型号) (4)、'appPackage'和'appActivity'可以通过cmd命令aapt dump badging + ”APK位置“来查看(apk的路径可以先放在电脑桌面,使用电脑桌面的路径),如图: com.ets100

Appium-Activity used to start app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity

感情迁移 提交于 2019-12-11 04:56:47
问题 I am trying to run a test file created on eclipse using appium. When I execute the test on a real android device connected to the system, I get the following error: Encountered internal error running the command: Error: Error occurred while starting App. Original error: Activity used to start app doesn't exist or cannot be launched! Make sure it exists and is a launchable activity. The app opens fine manually and on the emulator so I'm not sure what's the issue with real devices. 回答1: The

How to get content-desc in Android app using appium

一世执手 提交于 2019-12-11 04:24:23
问题 I am writing automation test for Android app. When I am trying to get content-desc for article title. I am not able to fetch it. FYI I don't have text. List<WebElement> arrayOfProperties2 = driver.findElementsByClassName("android.view.View"); for (WebElement property : arrayOfProperties2){ System.out.println("property" + property.getClass()); String contentDesc = property.getAttribute("name"); String contentDesc1 = property.getAttribute("className"); String contentDesc2 = property

Appium:Ruby: Load error in the gem

那年仲夏 提交于 2019-12-11 03:49:06
问题 I am having errors while loading this require-relative element. Any ideas how to resolve it? I have tried searching the android sdk, for the following mentioned in the require relative , is there any file that I should be placing to get this work?> require 'appium_lib' require_relative './libs/adbManager' require_relative './libs/error_handler' require_relative './libs/android_manifest_parser' The error: cannot load such file -- /Users/jain/Documents/fslearning-android/Features/Support/libs

Cucumber-jvm @after with Appium driver

China☆狼群 提交于 2019-12-11 02:42:17
问题 I'm using cucumber-jvm , and trying to implement global @After method which should be executed only once after all scenario's execution was completed. The @After method should quit the appium driver. Currently @After hook being executed after each running scenario , and it means that the driver should be created each time from scratch , but I do want to reuse it. Any help will be much appreciated 回答1: You can try using QAF which support Gherkin, where driver management is taken care by the

AWS Device Farm.How can i save the custom report being generated after the test case into my local space

♀尐吖头ヾ 提交于 2019-12-11 02:37:57
问题 I am working with AWS device farm.My test script when run on my local system works as expected and generates a report in my local system at specified path.Now when i run the code in the device farm the report does not get generated.Am i missing something? This is my test code to write the test cases to a html report. package testOutput; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; import

how to stop appium server through command line?

旧巷老猫 提交于 2019-12-11 01:29:06
问题 The command I'm using to start the Appium server: node appium --address 127.0.0.1 --port 4723 --session-override --no-reset --platform-name Android --platform-version 23 --automation-name Appium How would I stop the server through command line? 回答1: Ctrl + c or Run ps -A | grep appium Note the process ID Run kill [process ID] If you're looking to do this programmatically, see http://discuss.appium.io/t/launching-and-stopping-appium-server-programmtically/700. 回答2: If you have a lot of

Unable to locate element using xpath in Appium

陌路散爱 提交于 2019-12-11 01:23:46
问题 I am unable to identify an element using xpath. Attaching the screen shot of the same. I want to identify the list of elements with the tag <android.widget.LinearLayout> under <android.widget.ListView> and I have used the XPath expression: //android.widget.ListView/android.widget.LinearLayout This returns all the elements only from the 1st node and not the elements under <android.widget.LinearLayout> . Can some body help me out? Thanks in advance. 回答1: To recursively search all elements under

How to click on CTRL+M (Control + M) in WebdriverIO

杀马特。学长 韩版系。学妹 提交于 2019-12-11 01:23:13
问题 I have to issue a CTRL+M action in WebdriverIO, but it is not working. I have tried using different ways such as: browser.keys('Control').keys('m'); browser.keys(['Control','KeyM', 'NULL']); browser.keys(['Control', 'm', 'NULL']); browser.keys('Control').keys('KeyM'); browser.deviceKeyEvent(82); browser.pressKeycode(82); browser.keys('MENU'); None of the above are working. Can anyone help me? 回答1: Short answer, NO . You currently cannot chain key commands with any driver configuration. .keys(

How to start appium test on iOS simulator?

时光毁灭记忆、已成空白 提交于 2019-12-11 01:17:13
问题 I have the following setup and trying to start the test on iOS Simulator . I am a beginner and don't know how to start the test. I have already imported and installed appium from tutorials. The questions are: Is this setup correct? How to run the tests? import java.io.File; import java.net.URL; import java.util.HashMap; import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.remote