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