随笔分类 -  Appium

使用appium工具,用python代码编写移动app的测试用例
摘要:一、 iOS Driver 配置 options = AppiumOptions()options.load_capabilities({ "platformName": "iOS", "appium:automationName": "XCUITest", "appium:deviceName": 阅读全文
posted @ 2024-05-14 18:04 jiguanghover 阅读(81) 评论(0) 推荐(0) 编辑
摘要:Xcode WebDriverAgentRunner配置参考: https://www.cnblogs.com/dreamhighqiu/p/11023363.html 1. [WebDriverAgent] Using WDA path: '/Applications/Appium.app/Con 阅读全文
posted @ 2021-07-16 16:50 jiguanghover 阅读(266) 评论(0) 推荐(0) 编辑
摘要:一、WebDriverAgent安装到ios测试设备 a) 切换到appium 的appium-webdriveragent目录(/Applications/Appium.app/Contents/Resources/app/node_modules/appium-webdriveragent) b 阅读全文
posted @ 2020-07-30 14:52 jiguanghover 阅读(701) 评论(0) 推荐(0) 编辑
摘要:经过多次调试,在Safari上的测试脚本终于可以运行了,不过部分元素还是无法识别,还需要继续调试; #!/usr/bin/env/python # -*-coding:utf-8-*- import pytest from time import sleep from selenium import 阅读全文
posted @ 2020-03-22 12:51 jiguanghover 阅读(358) 评论(0) 推荐(0) 编辑
摘要:经过不断的调试WebDriverAgent, 现在终于可以执行ios的自动化测试脚本了,😄😄😄 # This sample code uses the Appium python client # pip install Appium-Python-Client # Then you can 阅读全文
posted @ 2020-03-21 12:22 jiguanghover 阅读(336) 评论(0) 推荐(0) 编辑
摘要:在使用真机调试的时候犯了一个错误,我把WebDriverAgent 下载到本地的A目录下,然后进行build安装,这样在模拟器上执行是无法发现问题的,但是使用appium 在真机上执行就出错了,因为Appium 调用的是它自己的WebDriverAgentRunner, 所以自动化测试脚本执行时会一 阅读全文
posted @ 2020-03-20 23:58 jiguanghover 阅读(2193) 评论(0) 推荐(0) 编辑
摘要:1.使用Xcode遇到的问题 xcode-select: error: tool 'instruments' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a comma 阅读全文
posted @ 2020-03-19 20:10 jiguanghover 阅读(1809) 评论(0) 推荐(0) 编辑
摘要:testcase.yaml: - id: home_search - id: search_input_text input: alibaba - id: name - id: current_price get: text class TestDemo: def test_search_from_ 阅读全文
posted @ 2020-03-08 12:18 jiguanghover 阅读(172) 评论(0) 推荐(0) 编辑
摘要:1. 对webview页面元素的处理self.driver.switch_to.context("WEBVIEW_com.aaa.bbb")source = self.driver.page_sourceprint("订单支付页面>>",source)print("context>>",self.d 阅读全文
posted @ 2019-04-19 14:06 jiguanghover 阅读(130) 评论(0) 推荐(0) 编辑
摘要:一、定义fixture方法 阅读全文
posted @ 2019-04-18 15:59 jiguanghover 阅读(246) 评论(0) 推荐(0) 编辑
摘要:在客户端登录或者退出登录的时候会有吐司提示,因此需要抓取来验证用户登录成功或者注销成功; 在获取toast之前需要添加 desired_caps['automationName'] = 'Uiautomator2' , 否则无法获取到toast 调用toast方法一: 阅读全文
posted @ 2019-04-12 14:54 jiguanghover 阅读(209) 评论(0) 推荐(0) 编辑
摘要:一、 Appium iOS API 1.1) WebDriverWait(self.driver, 10).until( EC.presence_of_element_located((AppiumBy.IOS_PREDICATE, "type == 'XCUIElementTypeStaticTe 阅读全文
posted @ 2019-01-31 17:35 jiguanghover 阅读(184) 评论(0) 推荐(0) 编辑
摘要:1. driver.findElement(MobileBy.AndroidUIAutomator("邀请")).click();2. driver.findElementById("resourceId").click();3. import io.appium.java_client.remot 阅读全文
posted @ 2019-01-30 16:47 jiguanghover 阅读(170) 评论(0) 推荐(0) 编辑
摘要:问题一、java.lang.NoClassDefFoundError: org/openqa/selenium/remote/SessionNotFoundExceptionCaused by: java.lang.ClassNotFoundException: org.openqa.seleniu 阅读全文
posted @ 2019-01-04 09:28 jiguanghover 阅读(1071) 评论(0) 推荐(0) 编辑
摘要:#coding=utf-8import os,sysimport unittestfrom appium import webdriverimport timefrom selenium.webdriver.common.by import Byfrom selenium.webdriver.sup... 阅读全文
posted @ 2015-11-15 16:03 jiguanghover 阅读(1447) 评论(0) 推荐(0) 编辑
摘要:有段时间没有使用python编写测试用例了,很长时间以来,感觉appium这个测试工具确实不错,今天又重新拿起来,分享一下自己学习的一些用例,欢迎大家一起交流、学习!1.登录客户端#coding=utf-8import osimport unittestfrom appium import w... 阅读全文
posted @ 2015-11-14 22:07 jiguanghover 阅读(2374) 评论(2) 推荐(0) 编辑