appium

Can't find an element on a webview page of an android native app using Appium

孤街醉人 提交于 2019-12-25 04:27:37
问题 I am not able to find the elements from android.webkit.webview package using java appium script. How to get the userText field and password field locators.so that i can pass the value to UI using the Appium script. 回答1: I have seen this problem with UIAutomator so many times. Try going to some other screen, fetch the elements of that screen and then come back to this screen again. Try to fetch the elements again and should work. 来源: https://stackoverflow.com/questions/32398841/cant-find-an

'An element could not be located on the page using the given search parameters' on Appium while uploading to AWS Device Farm

佐手、 提交于 2019-12-25 04:26:30
问题 I am using a sample app from AWS Github https://github.com/awslabs/aws-device-farm-sample-app-for-android I have Appium script recorded by Appium Inspector. import io.appium.java_client.AppiumDriver; import org.openqa.selenium.remote.DesiredCapabilities; import java.net.URL; public class AppiumTest { public static void main(String[] args) { DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability("appium-version", "1.0"); capabilities.setCapability(

Appium Parallel Test Execution removes driver for one device, showing A session is either terminated or not started

試著忘記壹切 提交于 2019-12-25 03:04:10
问题 Hi I tried to implement parallel test execution using TestNG and Appium, I used ThreadLocal. The problem is that one device after the first run is lost. But the other device is completed all its test. Here is my code, BaseDriver TestClass TestListener TestNG XML Error Description Appium Server Log Execution Log I am struggling to find where the driver is removed. Any help will be appreciated. 回答1: I fixed it by myself. As I am using System port and WDALocalPort I for single appium session, I

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)

Being too stupid to implement Appium Java client into Android Studio Project

喜你入骨 提交于 2019-12-25 01:44:53
问题 I recently started coding my really first android project using Android Studio 3.1.2 and SDK 19 (Android 4.4). When I came across testing I want to automate my UI-tests, which I plan to write with the java client of Appium (the server will be set up externally). In order to get the java-Client including all the drivers I added a dependency into the build.gradle(app) : implementation 'io.appium:java-client:6.1.0' Synching Gradle after adding the dependency didn't cause any recognizable

appium_获取元素状态

核能气质少年 提交于 2019-12-25 00:47:37
元素的属性我们经常会用到,当定位到某个元素后,有时会需要用到这个元素的 text值、className、resource-id、checked 等。 一般标准的属性我们都可以通过get_attribute(“属性名称”)来获取,我们来看看下面截图的元素都是怎么获取的吧。从上到下来看。 我们从text开始讲,我们先通过xpath方式定位到这个元素 # coding:utf-8 from appium import webdriver import time desired_caps = { "platformName": "Android", "deviceName": "emulator-5554", "platformVersion": "5.1.1", "appPackage": "com.sdu.didi.gsui", "noReset": True, "appActivity": "com.didichuxing.driver.sdk.LauncherActivity" } driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps) driver.find_element_by_xpath("//android.widget.EditText[@resource-id='com.sdu

How does a UI app inspectors (like the one in Appium) work?

蓝咒 提交于 2019-12-24 23:04:13
问题 Appium has a way to inspect the view hierarchy of an app using an inspector. I am interested in building one myself. I know the overview answer of: it uses some webdriver to accomplish this. But how? It puzzles me that a separate iOS app can some how communicate to another app, and show even its screen. How does it work under the hood? or how does the iOS app communicate to the UI inspector to send its screen shots and hierarchy? 回答1: It puzzles me that a separate iOS app can some how

Appium could not find devices, restarting adb server

此生再无相见时 提交于 2019-12-24 21:08:34
问题 I have looked on both the net and on stackoverflow for this issue, there are quite a few answers on this topic but none of these have worked for me. When I start Appium.exe, bearing the application (apk) path, package name and activity the Appium console displays the following error: ERROR: error: Could not pre-launch appium: Error: Could not find a connected Android device This is even before I get to code anything whatsoever. I have done some work with Android Web driver in the past and I

Appium support on Firebase Test Lab

梦想与她 提交于 2019-12-24 20:25:09
问题 Does anyone know if Appium Testing Framework is going to be supported on Firebase Test Lab? Is it in at least the roadmap? 回答1: Since Firebase is powered by Google, you hardly can expect it prioritise supporting open-source community driven framework, which Appium is. Currently Firebase supports native frameworks only: Espresso, Robotium and UI Automator 2.0 (2 of 3 are supported and driven by Google) I don't think Google use Appium internally. Since they started Beta support of iOS XCTest,

How to inspect element if there are multiple elements with same class name and doesn't have resource-id

↘锁芯ラ 提交于 2019-12-24 20:02:16
问题 <?xml version="1.0" encoding="UTF-8" standalone="true"?> -<hierarchy rotation="0"> -<node bounds="[0,0][720,1280]" selected="false" password="false" long-clickable="false" scrollable="false" focused="false" focusable="false" enabled="true" clickable="false" checked="false" checkable="false" content-desc="" package="com.talentpace.substk" class="android.widget.FrameLayout" resource-id="" text="" index="0"> -<node bounds="[0,0][720,1280]" selected="false" password="false" long-clickable="false"