python-appium

How to change the creation date of file using python on a mac?

南笙酒味 提交于 2021-02-19 05:02:21
问题 I need to update the creation time of a .mp4 file so that it will appear at the top of a list of media files sorted by creation date. I am able to easily update both the accessed and modified date of the file using os.utime, but have yet to find a good way to change the created date of a file to "now". My end goal is to seed media files to an iOS simulator using appium, and have those media files accessible in that script. The issue is that the video file will not be displayed in the

How to start appium server programmatically in Python

安稳与你 提交于 2020-12-07 05:11:10
问题 I want to write a android test framework using Appium and python. Appium link: http://appium.io/ So after installing appium with npm, to start its server I need to execute the command "appium" in terminal.It will start the server. It looks something like this after starting: ranits-MacBook-Pro:$ appium [Appium] Welcome to Appium v1.8.1 [Appium] Appium REST http interface listener started on 0.0.0.0:4723 But I need to start the appium server from my code using python? Any help? 回答1: First of

Windows Application Driver handle windows explorer window

a 夏天 提交于 2020-01-06 08:57:30
问题 I'm trying to automate a windows desktop application and everything is fine until in one of the steps in my application, I have to click on a "Browse" buttom that opens a windows explorer window to select an image and load it. The thing is that I do not know how to make WinAppDriver focus in this new window, to be able to select the image and load it. This is a part of the desktop application, and when sending click on Browse: 回答1: You probably need winappdriver to change its current handle

What Are Some Best Practices When Asserting iOS Elements Are Displayed?

让人想犯罪 __ 提交于 2020-01-05 07:05:17
问题 I'm trying to write my first UI Automation test for an iOS app with Appium/Python. I find that when I list 10 assertions like the one below, I get very inconsistent results ... sometimes it passes, but it usually fails the third assertion, sometimes it fails the eighth. assert driver.find_element_by_name('Settings').is_displayed() I've also tried to use waits: driver.wait_for_element_by_name_to_display('Settings') assert driver.find_element_by_name('Settings').is_displayed() Does anyone know

What Are Some Best Practices When Asserting iOS Elements Are Displayed?

烂漫一生 提交于 2020-01-05 07:04:38
问题 I'm trying to write my first UI Automation test for an iOS app with Appium/Python. I find that when I list 10 assertions like the one below, I get very inconsistent results ... sometimes it passes, but it usually fails the third assertion, sometimes it fails the eighth. assert driver.find_element_by_name('Settings').is_displayed() I've also tried to use waits: driver.wait_for_element_by_name_to_display('Settings') assert driver.find_element_by_name('Settings').is_displayed() Does anyone know

How to upload attachments in browser tests using Appium?

风格不统一 提交于 2019-12-25 15:59:27
问题 I am trying to automate a test case in Chrome where I would like to upload an attachment to an email. I use desiredCaps['browserName'] = 'Chrome'. While clicking attachments in email, it opens the Documents in the phone, but I am unable to detect the elements in the Documents screen. 回答1: Try this.If you are using ruby This basically goes into the directory called screenshots and finds the second picture or the document that is visible inside the directory find_element(id: "screenshots").find

Toggle Software Keyboard for entire test suite in appium python

萝らか妹 提交于 2019-12-25 11:52:49
问题 Currently I am writing iOS tests using Python Appium and would like to completely hide the software keyboard which pops up whenever you have to type something. I am already aware of driver.hide_keyboard() function but it's a pain to include it everywhere in tests. I was going over the Appium Desired Capabilites but couldn't find anything that will disable the software keyboard. Appreciate if anyone can help me here? 回答1: To disable soft keyboard in iOS simulator do this: Simulator Menu >

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

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 = {}

Functional test of an android app using appium and python

旧巷老猫 提交于 2019-12-12 11:11:57
问题 This is the python code to check if the recording works fine : def setUp(self):"Setup for the test" desired_caps = {} desired_caps['browserName']='' desired_caps['platformName'] = 'Android' desired_caps['platformVersion'] = '4.4.2' desired_caps['deviceName'] = 'd65d04425101de' # Returns abs path relative to this file and not cwd desired_caps['app'] = '/home/karthik/appiumworkspace/tests/app-debug (2).apk' desired_caps['appPackage'] = 'com.prueba.maverick' desired_caps['app-activity'] = '