我将 selendroid-test-app.apk 放在 与 test_appium.py 同级目录中,然后通过模拟器安装并打开它。

#coding=utf-8
from appium import webdriver
import os
from time import sleep

app = {}
app['platformName'] = 'Android'
app['platformVersion'] = '4.4.4'
app['deviceName'] = '192.168.169.101:5555'
app['app'] = os.path.abspath('./selendroid-test-app.apk')

driver = webdriver.Remote('http://localhost:4723/wd/hub', app)

sleep(3)
driver.find_element_by_id('com.junte.creditsystem:id/edt_phone').send_keys("123")
driver.find_element_by_id('com.junte.creditsystem:id/edt_pwd').send_keys("321")

# driver.quit()

results matching ""

    No results matching ""