appium

What Are Some Best Practices When Asserting iOS Elements Are Displayed?

烂漫一生 提交于 2020-01-05 07:04:38
问题 I'm trying to write my first UI Automation test for an iOS app with Appium/Python. I find that when I list 10 assertions like the one below, I get very inconsistent results ... sometimes it passes, but it usually fails the third assertion, sometimes it fails the eighth. assert driver.find_element_by_name('Settings').is_displayed() I've also tried to use waits: driver.wait_for_element_by_name_to_display('Settings') assert driver.find_element_by_name('Settings').is_displayed() Does anyone know

TestNG : Test case is ignored

我们两清 提交于 2020-01-05 04:37:33
问题 I am using TestNG framework for writing test cases for my Android application. For which I am using Appium testing tool. For this I have defined following files : pom.xml file - required for dependencies One BaseTest.java class Two child classes which is extended from BaseTest.java testng.xml file - defines running test classes in it. For better understanding of my question posting classes & xml files. This is pom.xml <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache

appium+python+unittest+HTMLRunner登录自动化测试报告

南楼画角 提交于 2020-01-04 10:33:07
环境搭建 python3 Java JDK .netFramework nodejs android SDK appium Appium-Python-Client(pip install Appium-Python-Client) 连接设备 cmd打开命令行窗口 输入adb connect 127.0.0.1:62001连接模拟器 输入adb shell dumpsys window windows | findstr "Current"获取当前包名 启动appium 常用元素定位 driver.find_element_by_id driver.find_element_by_class driver.find_element_by_name driver.find_element_by_xpath(//*[@text=‘text属性’]) 编写登录脚本 #!/usr/bin/env python # -*- coding: utf-8 -*- from appium import webdriver import unittest import time desired_caps = { 'platformName': 'Android', 'platfromVersion': '5.1', 'deviceName': '127.0.0.1:62001',

Cucumber-Appium - Where to store Hooks if initialising driver in @Before

独自空忆成欢 提交于 2020-01-04 07:27:48
问题 I'll try to explain how I've built this, I imagine something obvious may jump out. I'm relatively new to this but am building a cucumber-appium framework and am running into some trouble. Currently, I initialise my Appium driver in my @Before hook which is in a GlobalHooks class which contains all Hooks. I have altered the hook so part of it only runs at the start of the test run as Cucumber doesn't support global hooks and I don't see why I should initialise the driver before every test (I'm

In Appium Sendkeys didn't work as expected, it sends more than i give to it

自闭症网瘾萝莉.ら 提交于 2020-01-04 06:50:42
问题 I'm using Appium to write test cases of an Android application, when i tap the following code public void EnterQuantity() { wd.findElement(By.xpath("//android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.LinearLayout[1]/android.widget.FrameLayout[1]/android.widget.RelativeLayout[1]/android.widget.ScrollView[1]/android.widget.LinearLayout[1]/android.widget.LinearLayout[3]/android.widget.LinearLayout[3]/android.widget.LinearLayout[1]/android.widget.EditText[1]")).sendKeys

Appium Setup - no ./reset.sh file

我们两清 提交于 2020-01-04 06:22:24
问题 I am attempting to set up Appium and am following the tutorial. I get to the cd appium; ./reset.sh line in Install Ruby section. I don't have a reset.sh file anywhere. I've installed all prior steps, as well as XCode and Android Dev Studio . So I tried to skip over that step, and simply run appium with node . , which throws error: Error: Cannot find module '/Users/myname/Sites/myproject/appium Obviously it needs a server.js or app.js file, but the git clone git://github.com/appium/appium.git

windows-android-appium环境搭建

╄→гoц情女王★ 提交于 2020-01-04 03:43:58
一、安装jdk 安装jdk1.7以上版本,会生成一个jdk目录,和单独的jre目录(注意:不是jdk里面的jre,时安装过程中设置的那个jre路径)安装完成后并配置环境变量 在系统环境变量中,新建:JAVA_HOME的值时jdk目录 然后在path目录中增加jdk的bin目录和jre的bin目录 完成后,在cmd窗口输入java -version能够出现jdk版本,即成功 二、安装Android SDK 下载地址: http://tools.android-studio.org/index.php/sdk/ (直接下载zip版本,解压至任意目录即可) 下载完以后解压,。然后双击运行SDK Manager.exe 因为我们这里用不到android自带的虚拟机。只勾选一些必要的选项安装。 如图,只勾选这三个,其他的都取消勾选等最终安装完成以后,会发现当前目录多了几个文件夹,如下 配置环境变量: 在系统变量中新建ANDROID_HOME,值是刚解压的那个文件夹路径 然后在path中,加入ANDROID_HOME、tools、platform-tools、build-tools目录 注意这里build-tools目录下还有一级 全部配置完以后,检查:在cmd中输入adb,出现以下信息说明sdk安装成功了 adb devices在获取连接的安卓手机时,如果获取不了可以参考以下下步骤: 1

移动端自动化==>Windows-Android-Appium环境搭建

匆匆过客 提交于 2020-01-04 03:43:48
第一步 安装JDK,本机如果带有1.7及以上版本且配置好了环境变量,则可忽略此安装步骤。 JDK的安装包,百度下载即可。安装完成后配置环境变量。 cmd下验证环境变量是否配置成功 第二步 安装Android SDK(安卓软件开发包),测试Android手机必然是要安装Android SDK。 下载地址: http://tools.android-studio.org/index.php/sdk/ (直接下载zip版本,解压至任意目录即可) 解压到任意文件夹中即可,解压后将文件夹添加到环境变量中,添加环境变量,必须创建一个名为ANDROID_HOME的变量。 双击SDK Manager,选装工具。必装:Tools文件夹下Android SDK Platform-tools和Android SDK Build-tools,Android SDK Tools可以选择是否更新,建议网速OK直接更新。 Path环境变量中添加ANDROID_HOME、tools、platform-tools、build-tools目录。 注意:build-tools目录需要加上它下一级的28.0.0 环境变量配置完成后,就需要找一个安卓手机了,连接安卓手机,并将Android手机的开发者选项-USB调试打开。 在CMD下执行,adb devices,出现下图样式则代表通过adb命令

【转载】appium自动化环境搭建

佐手、 提交于 2020-01-04 03:43:24
1.java开发环境JDK 2.android SDK(platform/platform tools/tools/build tools) 3.python下载安装(pip) 4.appium下载安装(服务端+客户端) 5.安装appium-python-client 6.安装unittest 第一步 安装JDK,本机如果带有1.7及以上版本的,则可忽略此安装步骤。 JDK的安装包,百度下载即可。安装完成后配置环境变量。 cmd下java -version检查环境变量是否配置成功。 第二步 安装Android SDK(安卓软件开发包),测试Android手机必然是要安装Android SDK。 下载地址:http://tools.android-studio.org/index.php/sdk/ (直接下载zip版本,解压至任意目录即可) 解压到任意文件夹中即可,解压后将文件夹添加到环境变量中,添加环境变量,必须创建一个名为ANDROID_HOME的变量。 双击SDK Manager,选装工具。必装:Tools文件夹下Android SDK Platform-tools和Android SDK Build-tools,Android SDK Tools可以选择是否更新,建议网速OK直接更新。镜像:随便选个版本,喜欢啥版本选啥版本(本人安装的是 Android 5.0.1)

How to install and run appium in linux?

元气小坏坏 提交于 2020-01-03 06:20:51
问题 I want to do UI automation for opening an url in a real android device. For that I want to install and run appium on my linux system, please guide me how to do? Also suggest me Is there anyway to open an url in chrome browser using eclipse?? 回答1: Install appium on Linux 18.04 If you have node.js installed you can try : sudo npm install -g appium --unsafe-perm=true --allow-root it worked for me. 回答2: I guess all the information you need to run Appium in Linux is in this here: http://appium.io