我想使用Python(移动版)获取特定坐标的rgb代码

时间:2019-05-30 14:11:24

标签: python appium

我想使用Python(移动版)获取特定坐标的rgb代码

from appium import webdriver
from appium.webdriver.common.touch_action import TouchAction
import time
from PIL import Image, ImageGrab
desired_cap ={
"deviceName": "LGK430EQRWLJIJ",
"platformName": "Android",
"app": "C:\\Users\\xxxxxx\\Desktop\\xxxxxx\\AirMirror Remote 
control devices_v1.0.3.3_apkpure.com.apk"
}
driver = webdriver.Remote("http://localhost:4723/wd/hub",desired_cap)
time.sleep(10)
print("10 Saniye bekleniyor")
#driver.find_element_by_id('com.sand.airmirror:id/tvLogin').click()
handle_one_size = driver.get_window_size()
print(handle_one_size)
#TouchAction(driver).tap(None, 165, 1130, 1).perform()
img = ImageGrab.grab()
color = img.getpixel((402,113))
print(color)

此代码仅检索计算机的RGB代码,但我想在移动设备中运行它 请帮助我:(

0 个答案:

没有答案