appium

Appium/Selenium - assert that element declared as field is NOT displayed

大兔子大兔子 提交于 2020-01-06 20:24:07
问题 I declare a button as field in following fashion: @AndroidFindBy(name = "Schedule") private WebElement calendarButton; ... and later I make sure it's NOT displayed because the app is in some special mode. Assert.assertFalse(this.calendarButton.isDisplayed()); It gives me org.openqa.selenium.NoSuchElementException , but the test is failed. Any ideas how can I make such assertion? The thing I don't want to define By condition a few times in the code, so using property is handy. 回答1: After some

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

How to use Appium with Android Studio?

江枫思渺然 提交于 2020-01-06 13:07:23
问题 I'm trying to use Appium with Android Studio. My search on google doesn't helped much out! So what do I need in the gradle file and how to run the tests? Thanks 回答1: Your gradle file should be like this: apply plugin: 'java' repositories { mavenCentral() } dependencies { Mention all your jar here } From command line you can run your gradle(gradle assemble) to create the jar of your test and then you can run that jar. 来源: https://stackoverflow.com/questions/28969685/how-to-use-appium-with

Windows Application Driver handle windows explorer window

a 夏天 提交于 2020-01-06 08:57:30
问题 I'm trying to automate a windows desktop application and everything is fine until in one of the steps in my application, I have to click on a "Browse" buttom that opens a windows explorer window to select an image and load it. The thing is that I do not know how to make WinAppDriver focus in this new window, to be able to select the image and load it. This is a part of the desktop application, and when sending click on Browse: 回答1: You probably need winappdriver to change its current handle

Python + Appium 环境搭建

感情迁移 提交于 2020-01-06 06:50:19
---恢复内容开始--- Appium 自动化公司内部测试培训1-环境搭建 课程目的 一、Python + Appium 环境搭建 课程内容 1 安装前准备工作 搭建环境所需要的安装文件已经下载好,从SVN上获取即可,解压,如下 2 Appium环境搭建 Appium是一个开源的,适用于原生或者移动网络和混合应用程序在 iOS 和 Android 平台上的的开源自动化测试框架。 2.1 安装Node.js 点击安装文件,下一步下一步直接安装,安装成功后,输入cmd打开windows的命令提示符,输入 node -v , 可以看到node.js的版本,见截图: 出现以上,表示第一步安装安装成功。 2.2 安装JDK 点击下面文件安装 下一步下一步直接安装 本人的安装路径是C:\Program Files\Java\jdk1.7.0_17 安装完成后需要设置环境变量从而使编译器正常使用。右击“计算机”选择“属性”选择左边“高级系统设置”à选择上面“高级”选项卡点击右下角“环境变量”按钮。 接下来弹出的对话框会出现用户变量和系统变量。用户变量对当前登录账户有效,系统变量对所有用户都有效,读者可根据需要设置。 环境变量配置的方法/步骤: 1. 在系统变量里点击新建,变量名填写JAVA_HOME,变量值填写JDK的安装路径,在这里就填写“C:\Program Files\Java\jdk1

Appium环境搭建

梦想的初衷 提交于 2020-01-06 06:49:47
1. 下载安装node.js 首先进入node.js官网,选择对应机器的版本下载并安装。 下载地址:https://nodejs.org/en/ 我选择的是左侧的LTS版本,它是Long Term Support的缩写,简单的说就是能获得长期支持的版本。右边的版本是最新的,可能会有部分问题,还是用较为稳定的版本 下载之后开始安装。 目前我是放到C盘下,默认目录,你也可以放到其他目录,不影响。 如果这里显示 一定要将X改为上上图的状态,因为默认是添加到PATH变量里的。 然后一步步安装就可以了。 安装完js后,我们打开cmd窗口,输入"npm", node -v 进行验证 JDK安装 下载地址:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html 自行配置环境变量,切记验证jjdk是否安装成功 安装安卓开发工具 安卓SDK下载地址 http://dl.google.com/android/android-sdk_r23.0.2-windows.zip sdk自行配置,自行验证。切记adb命令一定要可用。 Appium程序安装 地址:https://bitbucket.org/appium/appium.app/downloads/ 将下载的

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(

Appium WinAppDriver C# Calculator example Error

泄露秘密 提交于 2020-01-06 06:08:16
问题 I'm trying to just run the calculator test C# example (https://github.com/Microsoft/WinAppDriver/tree/master/Samples/C%23/CalculatorTest) inside visual studio 2017. When I download and build the example, it shows several lines as deprecated; DesiredCapabilities appCapabilities = new DesiredCapabilities(); appCapabilities.SetCapability("app", CalculatorAppId); appCapabilities.SetCapability("deviceName", "WindowsPC"); and one as an error that needs to be changed; CalculatorSession.Manage()

RobotFramework - Run Tests on different environments

怎甘沉沦 提交于 2020-01-06 05:27:27
问题 I need to run specific tests for specific environments QA, Dev, Test etc., I have put a Tag on different tests i want to run on different, I am using AppiumLibrary as I am working on a mobile device, I was thinking to use a text file with all variables i need to execute for specific enviroments something like this. --variable Env:http://example.test.com:1111 --variable remoteUrl:http://127.0.0.1:123/web/hub --variable platformVersion:8.0 --variable platformName:Android --variable deviceName