Appium
Appium
王小彩
这个作者很懒,什么都没留下…
展开
-
Appium设置:No Reset/Full Reset
说明:If noReset is set to TRUE, the app data will NOT be cleared before this session starts.If fullReset is set to true, the app will get uninstalled and all data will be cleared.默认fullResetnoReset测试后停止并清除应用数据,不卸载APK在会话开始前 测试后 停止app,清除app数据并卸载原创 2020-08-13 09:49:05 · 2989 阅读 · 0 评论 -
Appium + Python:Exceptions(异常)
selenium.common.exceptions异常: selenium.common.exceptions.ElementNotSelectableException(msg=None, screen=None, stacktrace=None)依据: selenium.common.exceptions.InvalidElementStateException当尝试选择一个未能选中的元素时,异常会抛出异常: selenium.common.exceptions.Ele转载 2020-08-05 11:33:13 · 609 阅读 · 0 评论 -
Appium xpath 定位问题及常用方法【转】
来源:https://blog.csdn.net/onandonandon/article/details/55259273?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.channel_param&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.c转载 2020-07-23 14:03:17 · 175 阅读 · 0 评论 -
Appium+Python移动自动化【13】:Appium Python API
1.contextscontexts(self):Returns the contexts within the current session.返回当前会话中的上下文,使用后可以识别H5页面的控件:Usage:driver.contexts2. current_contextcurrent_context(self):Returns the current context of the current session.返回当前会话的当前上下文:Usage:driver.curr原创 2020-06-18 15:49:23 · 1089 阅读 · 0 评论 -
Appium+Python移动自动化【4】:在配置文件中读取yml文件,应用到remote_driver中
from appium import webdriver# 新建driverdriver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps)原创 2020-05-26 16:11:51 · 266 阅读 · 0 评论 -
Appium+Python移动自动化【12】:appium+python+pytest+allure方法集合
# 自定义一个获取 toast内容的方法def get_toast_content(self, message): tmp_feature = By.XPATH, "//*[contains(@text,'%s')]" % message ele = self.find_element(tmp_feature) return ele.text# 自定义截图函数def take_screenShot(self):'''测试失败截图,并把截图展示到allure报告中'''原创 2020-05-26 15:01:11 · 324 阅读 · 0 评论 -
Appium+Python移动自动化【11】:appium启动运行log分析
1、手动启动appium 服务Launching Appium server with command: C:\Program Files (x86)\Appium\node.exe lib\server\main.js --address 127.0.0.1 --port 4723 --platform-name Android --platform-version 22 --automation-name Appium --device-name “lge-nexus_4-005475cbccd27原创 2020-05-22 14:48:31 · 701 阅读 · 0 评论 -
Appium+Python移动自动化【10】:android物理按键
keyevent(self, keycode, metastate=None)用法 :driver.keyevent(4)keyevent方法直接发送按键码就可以了,如返回键操作driver.keyevent(4) #返回键操作物理按键按键码电话键KEYCODE_CALL (拨号键)5KEYCODE_ENDCALL (挂机键)6KEYCODE_HOME (按键Home)3KEYCODE_MENU (菜单键)82KEYCODE_BACK原创 2020-05-21 16:45:33 · 600 阅读 · 0 评论 -
Appium+Python移动自动化【9】:滚动查找不在屏幕内的元素
循环滚动列表,直到找到目标元素并触发点击事件from appium import webdriverimport timedesired_caps = {}desired_caps['platformName'] = 'Android'desired_caps['platformVersion'] = '7.0'desired_caps['deviceName'] = 'xxxxxx...原创 2020-04-23 11:35:03 · 1464 阅读 · 0 评论 -
Appium+Python移动自动化【8】:This dictionary creation could be rewritten as a dictionary literal
报错信息:This dictionary creation could be rewritten as a dictionary literal解决方案:将desired_caps = {}写成desired_caps = dict()原创 2020-04-08 11:13:47 · 774 阅读 · 0 评论 -
Appium+Python移动自动化【7】:allure报告出现404?
安装Allure:allure-2.12.1下载地址:https://github.com/allure-framework/allure2/releases下载文件:allure-commandline-2.12.1.zip解压到任意目录,添加环境变量PATH=E:\allure-2.12.1\bin安装Allure Pytest Adaptor:Allure Pytest Adap...原创 2020-03-26 10:11:46 · 2247 阅读 · 2 评论 -
Appium+Python移动自动化【6】:Jenkins安装
步骤:安装jdk:jdk1.8.0_111安装jre:jre1.8.0_111安装tomcat:Tomcat 8.5安装jenkins:jenkins.war安装Tomcat:下载地址:http://tomcat.apache.org/下载文件:32-bit/64-bit Windows Service Installer安装完成启动服务:在安装目录下\Tomcat 8.5\b...原创 2020-03-25 15:15:39 · 202 阅读 · 0 评论 -
Appium+Python移动自动化【5】:HTMLTestRunner
安装文件下载链接:https://pypi.org/project/html-testRunner/#files安装命令:>pip3 install html_testRunner-1.2.1-py2.py3-none-any.whlPycharm(python3)引入HTMLTestRunnerfrom HTMLTestRunner import HTMLTestRunner...原创 2020-03-24 10:50:01 · 244 阅读 · 0 评论 -
Appium+Python移动自动化【3】:paramiko解决ssh登陆报错
问题1:我的代码:import paramikossh = paramiko.SSHClient()# 允许连接不在know_hosts文件中的主机ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())# 连接服务器ssh.connect(hostname='127.0.0.1', port=4723, username=...原创 2020-03-10 13:28:20 · 3534 阅读 · 0 评论 -
Appium+Python移动自动化【2】:"ps 'uiautomator'"
Pycharm报错信息:selenium.common.exceptions.SessionNotCreatedException: Message: A new session could not be created. (Original error: Command failed: C:\Windows\system32\cmd.exe /s /c “E:\android-sdk-win...原创 2020-02-14 17:00:42 · 499 阅读 · 3 评论 -
Appium+Python移动自动化【1】:failed to install settings_apk-debug.apk
Pycharm运行报错:selenium.common.exceptions.SessionNotCreatedException: Message: A new session could not be created. (Original error: Command failed: C:\Windows\system32\cmd.exe /s /c “E:\android-sdk-win...原创 2020-02-14 15:25:17 · 2115 阅读 · 0 评论 -
解释:webdriver.Remote('http://127.0.0.1:4723/wd/hub',desired_caps)
#coding=utf-8from appium import webdriverdesired_caps = {}desired_caps['platfromName'] = 'Android'desired_caps['platfromVersion'] = '6.0'desired_caps['deviceName'] = '02743107C5002344'desired_...原创 2020-02-14 11:34:04 · 9474 阅读 · 4 评论 -
Appium+Python移动端自动化测试环境
本地系统:Windows10 x 64一、 安装JDK本地安装文件:jdk-8u111-windows-x64.exe配置环境变量:变量变量值JAVA_HOMEC:\Program Files\Java\jdk1.8.0_111Path%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;CLASSPATH.;%JAVA_HOME%\...原创 2020-02-13 12:01:54 · 221 阅读 · 0 评论