python-appium

Appium Android UI testing - how to verify the style attribute of an element?

一个人想着一个人 提交于 2019-12-12 01:40:52
问题 I would like to verify the style of an element i.e. the color of the text shown in a textview. Whether it is black or blue ex. textColor or textSize. This information is not listed in the uiautomatorviewer. I can get the text using elem.get_attribute("text") as the text value is seen in the Node Detail. Is there a way to check for the style attributes?( I can do this fairly easy with straight selenium.) 回答1: Update. As it turns out that cannot be done with appium webdriver. For those of you

Double tap in IOS Simulator Not working

我与影子孤独终老i 提交于 2019-12-10 22:07:04
问题 I am trying to double tap an element in IOS Simulator using appium but unable to do so. Methods tried: action.tap(x=xx, y=yy, count=1).release().perform() 2 times in a row,but it seems there is a 2 second gap which in real world would not be a double tap element.click same problem as above action.press(x=xx, y=yy).wait(500).release().perform().press(x=0, y=0).wait(500).perform() no result action.tap(x=xx, y=yy, count=2).release().perform() no result. Is there any thing else i can try or any

Appium - Design page object to reuse same function with iOS and Android

走远了吗. 提交于 2019-12-08 10:17:37
问题 I'm currently using page objects in my Appium and Python project to run the tests only on the iOS platform. Now I need to implement the same tests for Android (the app is the same). I know the locators are different for each platform, but the functions I created I can use for both platforms. In java the @iOSXCUITFindBy and @AndroidFindBy annotations make design easier for this purpose, but so far I haven't found anything similar to use with Appium and Python. What strategy can I use to reuse

Zoom action in android using appium-python-client

只愿长相守 提交于 2019-12-06 21:21:56
问题 Does anybody know how to zoom an element in android via appium python client? I am currently using self.driver.zoom(self.element, percent) but this gives an error self.driver.zoom(self.element, percent) File "/usr/local/lib/python2.7/site-packages/appium/webdriver/webdriver.py", line 308, in zoom self.execute_script('mobile: pinchOpen', opts) File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 461, in execute_script {'script': script, 'args':converted

Zoom action in android using appium-python-client

人盡茶涼 提交于 2019-12-05 02:48:40
Does anybody know how to zoom an element in android via appium python client? I am currently using self.driver.zoom(self.element, percent) but this gives an error self.driver.zoom(self.element, percent) File "/usr/local/lib/python2.7/site-packages/appium/webdriver/webdriver.py", line 308, in zoom self.execute_script('mobile: pinchOpen', opts) File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py", line 461, in execute_script {'script': script, 'args':converted_args})['value'] File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/remote/webdriver.py",

Open Chrome in incognito mode on real Android Device using Appium

半世苍凉 提交于 2019-12-04 05:11:33
问题 I'm using Appium to test my website on Chrome for Android. I would like to add some options to Chrome for Android such as the incognito mode and the possibility to disable the cache. I tried with the following sample code but it doesn't work properly. Appium is able to open Chrome on my Android device, but it isn't in incognito mode and hence it doesn't disable the browser's cache. Here there is the code snippet of my Python script: import appium from time import sleep desired_caps = {

Open Chrome in incognito mode on real Android Device using Appium

这一生的挚爱 提交于 2019-12-02 07:52:22
I'm using Appium to test my website on Chrome for Android. I would like to add some options to Chrome for Android such as the incognito mode and the possibility to disable the cache. I tried with the following sample code but it doesn't work properly. Appium is able to open Chrome on my Android device, but it isn't in incognito mode and hence it doesn't disable the browser's cache. Here there is the code snippet of my Python script: import appium from time import sleep desired_caps = { 'platformName' : 'Android', 'platformVersion' : '7.1.1', 'deviceName' : 'ZX1G423BZQ', 'browserName' : 'Chrome