appium

Ruby/Cucumber: Integration to Jenkins : Bitbucket

∥☆過路亽.° 提交于 2019-12-13 06:57:43
问题 NOTE: Jenkins linked to the machine, where all the automation set up is done, and cucumber test steps can be run with the command cucumber flawlessly. I have a repository in bitbucket, and I am trying to get it run on the jenkins on each change to my repository. Currently, the tests that I have written with cucumber/gherkin and ruby are for mobile automation tests with appium using appium_lib I am trying to get this run in the jenkins but, jenkins would keep displaying the error can't find

Appium iOS automation using Java : get element using accessibility Id?

你离开我真会死。 提交于 2019-12-13 06:38:24
问题 I am new to iOS automation using Appium. I can access elements and do automation using XPath like this driver.findElement(By.xpath("//UIAApplication[1]/UIAWindow[2]/UIASecureTextField[3]")).click(); I would like to access elements using the accessibility label name given. When using the Appium inspector I can see that the accessibility name is displayed under the parameter Value . But How to access this value using Java code? Thanks. 回答1: You should be able to use the

Scrapy学习日记5

坚强是说给别人听的谎言 提交于 2019-12-13 06:35:06
1.自动化测试工具原理 解析:自动化测试工具的原理是通过程式化地操作浏览器,与其进行模拟交互[例如,点击、打字、导航等等]来控制要抓取的网页。 2.无头浏览器 解析:无头指的是不显示浏览器的GUI,是为了提升性能而设计的,因为渲染图像是一件很消耗资源的事情。 3.Puppeteer功能 解析: [1]生成截图和页面PDF [2]抓取单页应用,产生预渲染内容[即SSR,服务端渲染] [3]自动化表单提交、UI测试、键盘输入等等 [4]创建一个最新的、自动化的测试环境 [5]捕获网站的时间线来帮助诊断性能问题 [6]测试Chrome插件 4.Puppeteer与RPA区别 解析:Puppeteer自动化工具很类似RPA[Robotic Process Automation],都是自动化一些繁琐的、重复性的工作,只不过后者不仅限于浏览器,其范围[Scope]是基于整个操作系统的,功能更强大,但是开销也更大。 5.Appium 解析:Appium是一个开源测试自动化框架,可用于原生,混合和移动Web应用程序测试。它使用WebDriver协议驱动iOS,Android和Windows应用程序。 6.Appium组件 解析: [1]Appium Server:Appium Server是Appium的服务端–一个Web接口服务,使用Node.js实现。 [2]Appium Desktop

Appium移动端UI自动化框架

好久不见. 提交于 2019-12-13 05:13:18
文章目录 Appium 环境安装和准备 1.安装Android SDK 2.安装appium server 3.PyCharm中安装appium-python-client 4.aapt查看apk包名和activity信息 5 编码指定操作设备 6.运行以上脚本 4.元素定位 5.操作页面 Appium 环境安装和准备 1.安装Android SDK 配置系统环境变量(不是用户环境变量) PATH ANDROID_HOME adb常用命令 adb --help #查看常用命令 adb devices # 查看连接的设备 adb install XXX.apk #安装XXX包 adb -s YYY install XXX.apk # 在YYY机器上安装XXX包 # adb -s 3eade061 install E:/KKLOnline-v4.4.1-kaikela-verify.apk adb start-server #启动服务 adb kill-server #关闭服务 adb shell #进入shell模式(root后的机器) 2.安装appium server 安装appium server作为服务器 配置环境变量 将…\Appium\node_modules.bin\配置到系统变量 检测是否安装成功 apppium-doctor 3.PyCharm中安装appium

Cannot get 'index' node detail by getAttribute

爱⌒轻易说出口 提交于 2019-12-13 05:11:25
问题 I am new to Appium automation and I'm trying to retrieve 'index' node value by using .getAttribute in my code but am not able to. Is there any way that i can retrieve index of a particular element locator? String x = driver.findElement(By.xpath("//android.widget.TextView[@text='"+str+"']/../..")).getAttribute("index"); 回答1: You cannot retrieve index value using getAttribute() method, instead use something like a counter to identify the number of the times the text field occurs on the screen.

Issue with scroll down in android Appium WebDriver

自闭症网瘾萝莉.ら 提交于 2019-12-13 04:59:20
问题 How can I scroll down for the element appearance in Appium WebDriver? We are using an emulator for automation. Any suggestions/help would be appreciated. 回答1: This works TouchAction action = new TouchAction(androidDriver); action.press(0, 500) .waitAction(200) .moveTo(0, 200) .release() .perform(); Just play with the coordinates to get the desidered swiping. 回答2: For that you can use scrollToExact() or scrollTo() functions of the AppiumDriver AppiumDriver driver = new AppiumDriver(); to

Can't find an element on a webview page of an iOS native app using Appium

女生的网名这么多〃 提交于 2019-12-13 04:51:46
问题 I have a native app which opens few web-view pages. I'm running appium on the app to do some automation test on a web-view page that I need to scroll down to find the username and password fields. I tried all the suggestion I can find online, and it doesn't work. Can anyone help? I'm running: Appium v1.3.5 iOS 8.1 Here is my code: // switch to webview Thread.sleep(6000); final Set<String> contextNames = driver.getContextHandles(); for (final String contextName : contextNames) { System.out

Screenshot iOS: WebView Context : Full page screenshot and not just visible viewport

被刻印的时光 ゝ 提交于 2019-12-13 04:38:49
问题 I need to take screenshot of Safari browser on iOS, but the screenshot has to be of whole page rather than just visible viewport. Like we get in firefox in WebDriver. Any suggestions? Currently Using: Selenium and Appium PS: I prefer not using any external applications, maybe any solutions via selenium/appium. 回答1: Install any of the below app. Barry:-http://barryapp.com/ Website Screenshot :- https://itunes.apple.com/us/app/website-screenshot/id437683442?mt=8# 来源: https://stackoverflow.com

Appium server not detecting the device connected through wifi

隐身守侯 提交于 2019-12-13 04:36:14
问题 did adb tcpip 5555 and adb connect ipaddress . The adb devices show the device. But when i run the appium server, its showing no android device connected. The appium python code is desired_caps = {} desired_caps['platformName'] = 'Android' desired_caps['deviceName'] = 'Android' desired_caps['automationName'] = 'uiautomator2' desired_caps['udid'] = 'xx.xx.xx.xx:5555' desired_caps['platformVersion'] = '6.0.1' desired_caps['appPackage'] = 'PackageName' desired_caps['appActivity'] = 'activityName

How to capture the Toast in Android with appium

落爺英雄遲暮 提交于 2019-12-13 04:22:32
问题 I used like this,but not found. WebElement element = androidDriver.findElementByClassName(android.widget.Toast); So I search in every major forum and portal,they solved it by blow: WebDriverWait wait = new WebDriverWait(androidDriver, 3); WebElement toastView = wait.until(ExpectedConditions.presenceOfElementLocated( By.xpath(".//*[contains(@text,'" + toast + "')]"))); But it works well in the condition of you has known the toast text . 回答1: Here is my finally solution: WebElement toastView =