首页 > 其他 > 详细

selenium.common.exceptions.ElementNotVisibleException: Message: element not interactable (Session info: chrome=74.0.3729.108) (Driver info: chromedriver=2.43.600210

时间:2020-06-22 19:27:22      阅读:68      评论:0      收藏:0      [点我收藏+]

解决此问题方法:与浏览器窗口有关,我把浏览器窗口设置为最大化,解决了此问题

下面上代码

import pytest
from selenium import webdriver
from page.ddll_login import Login
@pytest.fixture(scope="session")
def int_start():
    """"""
    """初始化一个浏览器"""
    driver = webdriver.Chrome()
    login = Login(driver)  # 初始化登录
    driver.maximize_window()
    yield login,driver
    # driver.quit()s
@pytest.fixture(scope="class")
def login_success(int_start):
    """登录成功的方法"""
    login = Login(int_start[1])  # 注意。整个测试里只能出现一次(只能初始化一次浏览器) webdriver.Chrome()
    yield login.to_login("18684720553", "python")

 

selenium.common.exceptions.ElementNotVisibleException: Message: element not interactable (Session info: chrome=74.0.3729.108) (Driver info: chromedriver=2.43.600210

原文:https://www.cnblogs.com/tzxy/p/13178526.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!