Help with Python Appium iOS Test Script for Opening Settings and Clicking Buttons
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
Línea de trabajo
Comienza con el Appium Python Quickstart enlazado y el script TestIOSSettings proporcionado; después, reproduce el inicio de Settings y la interacción con Screen Time en el iPhone 15 indicado con iOS 17.2. Se considera terminado cuando se haya documentado una guía fiable para abrir Settings, interactuar con sus controles y distinguir entre el inicio nuevo de la aplicación y la conexión a una aplicación existente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Hi Appium team,
I’m trying to create a Python test script for iOS using Appium. I followed the Quickstart example for Android, but when I adapted it to an emulated iPhone device, I ran into a few issues.
Currently, I want to:
- Open the iOS Settings app.
- Click a specific button or section (e.g., "Screen Time").
- Assert a certain text exists.
- Understand how to control app launch behavior in Appium:
4a. Start an app fresh: Launch the app as if it has never been opened before on the device (no cached state, fresh session).
4b. Attach to an already running app: Connect to the app if it’s already running on the emulator or device, without restarting it.
import unittest
import warnings
from appium import webdriver
from appium.options.ios import XCUITestOptions
from appium.webdriver.common.appiumby import AppiumBy
options = XCUITestOptions()
options.platform_name = "iOS"
options.automation_name = "XCUITest"
options.device_name = "iPhone 15"
options.platform_version = "17.2"
options.bundle_id = "com.apple.Preferences"
options.language = "en"
options.locale = "US"
# options.device_id = "1F4F5697-3E82-4EC9-819A-9478BDE3E598"
appium_server_url = "http://127.0.0.1:4723"
class TestIOSSettings(unittest.TestCase):
def setUp(self) -> None:
self.driver = webdriver.Remote(command_executor=appium_server_url, options=options)
def tearDown(self) -> None:
if self.driver:
self.driver.quit()
def test_open_screen_time(self) -> None:
el = self.driver.find_element(AppiumBy.IOS_PREDICATE, 'label == "Screen Time"')
el.click()
if __name__ == "__main__":
unittest.main()
Problems I encountered:
- I cannot navigate into Settings reliably; nothing is happening on the emulated iPhone screen.
- I’m unsure how to launch an app fresh vs attach to an already running app.
Could you provide guidance on:
- The correct way to open system apps like Settings and interact with buttons.
- How to launch an app from scratch or attach to an existing session.
Any tips for using iOS emulators specifically with Python/Appium.
Thanks in advance!
Best regards,
Alex
- Lenguaje dominante
- Python
- Estrellas
- 1.8k
- Forks
- 570
- Merge medio
- 1 d 9 h
- PR fusionados (30 d)
- 25
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de appium/python-client
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
appium/python-client#1230 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 55/100
appium/python-client#1147 · 7 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 3/5 1-2 días Aptitud para principiantes 38/100
appium/python-client#1091 · 4 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
appium/python-client#1076 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 20/100
appium/python-client#980 · 7 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de appium/python-client
Issues similares
-
correction metadata
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
acl-org/acl-anthology#10104 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug status/needs-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
prowler-cloud/prowler#12885 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Bug in GaussianTailProbabilityCalibrator: running_statistics=False still uses a windowed varianceAbiertobug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
selimfirat/pysad#107 ·
Los mantenedores suelen responder en 1 día
-
bug ci-failure high priority
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
vllm-project/vllm-omni#8194 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
Los mantenedores suelen responder en 1 día