appium

Appium + Android + WebDriver findElement() : cannot find element after sendKeys()?

时间秒杀一切 提交于 2019-12-12 20:21:24
问题 I have a simulated Android device and Appium. My test successfully launches the right Activity and types in a particular text field. But when I try to find the same text field in order to check the text in it, I get "An element could not be located on the page using the given search parameters." Even if I try to re-use the element instead of searching for it a second time, it still fails with the same message. What should I do differently? Maybe the context for the second findElement() is

info: [debug] Proxying command to localhost:8080

百般思念 提交于 2019-12-12 20:01:47
问题 I am getting error message while running the python code with Android 4.1.2 (API level 16) This is my python code : import os from time import sleep import unittest import time from appium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC class MaverickAndroidTests(unittest.TestCase): #API level less than 17 def setUp(self): "Setup for the test" desired_caps = {}

Appium(七):Appium API(一) 应用操作

谁说胖子不能爱 提交于 2019-12-12 18:54:39
1. 应用操作 本章所罗列的方法主要针对应用的操作,如应用的安装、卸载、关闭、启动等。 把前面的启动代码放在这里,后面只展示不同的部分。 # coding:utf-8 from appium import webdriverfrom time import sleep # 初始化 desired_caps = {} # 使用哪种移动平台 desired_caps['platformName'] = 'Android' # Android版本 desired_caps['platformVersion'] = '5.1.1' #使用adb devices -l 查询,当有多台设备时,需要声明 desired_caps['deviceName'] = '127.0.0.1:62001' #包名 desired_caps['appPackage'] = 'com.android.settings' #界面名 desired_caps['appActivity'] = '.Settings' # 启动服务 driver = webdriver.Remote('http://127.0.0.1:4723/wd/hub', desired_caps) 1.1 获取应用的包名和界面名 当我们从一个应用跳转到另外一个应用的时候,想输出其包名、界面名或者想在报告中展现对应信息,

How to scroll top to botton using Android driver

烂漫一生 提交于 2019-12-12 18:26:32
问题 I tried scrollTo() to scroll my app page using andriod driver, but not worked because it is deprecated from javaclient 4.1.2. I have gone through below link but couldn't find any solution . How can I scroll an android app page from top to bottom using appium driver? Please provide me solution 回答1: My example is from python but it will work for Java as well just use java syntax to find element like driver.find_element_by_android_uiautomator('new UiScrollable(new UiSelector().scrollable(true)

How to open chrome in incognito tab

时光怂恿深爱的人放手 提交于 2019-12-12 17:04:36
问题 I have a scenario open a web link in incognito tab in chrome browser. I am using adb command to open chrome and navigate to specific URL i.e adb shell am start -n com.android.chrome/com.google.android.apps.chrome.Main -d weburl . Is there any way to open link directly in incognito mode through adb? 回答1: I could not find any way using adb commands. But using ChromeOptions it is possible if we add " --incognito " argument. 回答2: You can launch chrome in incognito mode with the -incognito flag. I

Appium & Webdriver (webdriverjs) - cannot execute javascript code

家住魔仙堡 提交于 2019-12-12 15:54:06
问题 I am trying to execute javascript Appium test using WD. My code should look something like this: "use strict"; var wd = require("wd"); var chai = require("chai"); var chaiAsPromised = require("chai-as-promised"); var jQuery = require("jQuery"); chai.use(chaiAsPromised); chai.should(); chaiAsPromised.transferPromiseness = wd.transferPromiseness; var desired = { "appium-version": "1.0", platformName: "iOS", platformVersion: "7.1", deviceName: "iPhone Retina (3.5-inch)", app: "/Users/{myuser}

TeamCity fails to run iOS appium tests when auto-launched

此生再无相见时 提交于 2019-12-12 15:24:54
问题 Description We are using appium in our cucumber suite within TeamCity 8 on an Apple MacMini running Mavericks. The problem is that appium seems to fail to interact with the iOS Simulator when it is ran from TeamCity at login (via Automator). The only combination that I have found to work is to run the following from the Terminal in an interactive session: sh /Applications/buildagent/bin/agent.sh start What does not work? running agent.sh start from an ssh session creating a shell script with

Android UI automation test with appium

无人久伴 提交于 2019-12-12 14:31:22
问题 I just working on android UI automation test in few weeks. I tried with robotium in a time and now I want change to appium framework. And my question are: I read that appium is a test tool to test webview application. So how about the other app that is not webview app? Can I run test from appium on genymotion? Any other tool do I need to install with appium(selenium or something)? Edit When I try to install appium with out sudo I got this error ERR! Error: EACCES, unlink '/Users//appium/node

Appium : unable to run script in multiple android device connected

て烟熏妆下的殇ゞ 提交于 2019-12-12 07:27:55
问题 Created multiple instance of appium. from console i run : node . -p 4722 -U Z*****K --chromedriver-port 9 515 -bp 2251 node . -p 4723 -U T*****K --chromedriver-port 9 516 -bp 2252 Instances are created on both the devices but the URL opens only on the second device connected.Browser in the first device just stays open without the url being opened. Code : Specflow file : Test.feature Scenario: Check Home Page Given I am on home page Then My title should be 'whatever' Steps.cs [Given(@"I am on

How to go to next screen of an app using appium?

江枫思渺然 提交于 2019-12-12 06:56:27
问题 Can anyone tell me how to go to next screen, for example like in Times of India or Indian Express app or news in shorts app, there are 50 news stories and I want to go on all the pages so how to swipe till 50th page? I tried driver.swipe(344, 955, 346,247, 3000) ; with that I am able to swipe to next pages, but I am not sure how go to all the 50 pages one by one. 回答1: Have you tried a for loop? int pageCount = 50; for(int currentPage = 1; currentPage < pageCount; currentPage++){ driver.swipe