AirtestProject / AirtestProject/Airtest

使用airtest封装的chrome模拟手机浏览器H5页面操作,查找元素时,页面会闪变尺寸

Ouverte
#942 2 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Python
Étoiles
9.6k
Forks
1.5k
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Remove any following parts if does not have details about

**Describe the bug**
使用airtest封装的chrome模拟手机浏览器H5页面操作,查找元素时,页面会闪变尺寸,在手机模式和网页模式之前不停切换,不停闪动页面
使用selenium chrome不会出现闪变问题

```
paste traceback here
```
from airtest.core.api import *
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from airtest_selenium.proxy import WebChrome
from selenium.webdriver.common.touch_actions import TouchActions
options = webdriver.ChromeOptions()
# 设置中文
options.add_argument('lang=zh_CN.UTF-8')
options.add_experimental_option('mobileEmulation', mobileEmulation)
driver = WebChrome(chrome_options=options)
driver.get("http://www.baidu.com")
driver.maximize_window()
time.sleep(3)
ele = driver.find_element_by_css_selector("article")

**python version:** `python3.7`

**airtest version:** `1.1.1`

![lALPDhmOwM6MH0vNAuHNBS4_1326_737](https://user-images.githubusercontent.com/38344643/125908476-2cb76299-b5d4-4757-9a0d-4fe2f13bfbd8.png)
![lALPDh0cP3NiooDNAtTNBKg_1192_724](https://user-images.githubusercontent.com/38344643/125908491-07def137-fbfa-4c29-9dfd-37fa0bd775be.png)

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.