老师,关于--headless

来源:9-8 无页面的后台运行方式

weixin_慕雪2209780

2020-02-05

我一加上这个就超时报错,找不到“笔记本”这个按钮


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

  File "D:/测试/自动化测试/Web自动化测试/Selenium/pageobject/testcase/test.py", line 39, in <module>

    t.test_save_info()

  File "D:/测试/自动化测试/Web自动化测试/Selenium/pageobject/testcase/test.py", line 20, in test_save_info

    goods_list_page.get_goods_list_driver("电脑", "笔记本")

  File "D:\测试\自动化测试\Web自动化测试\Selenium\pageobject\pages\goods_list_page.py", line 36, in get_goods_list_driver

    second = self.find_element(*second_element)

  File "D:\测试\自动化测试\Web自动化测试\Selenium\pageobject\pages\base_page.py", line 58, in find_element

    raise TimeoutException(msg="定位元素失败,定位方式是:{}".format(locator))

selenium.common.exceptions.TimeoutException: Message: 定位元素失败,定位方式是:('link text', '笔记本')



Process finished with exit code 1



写回答

2回答

慕粉3827970

2020-02-09

现在解决了吗?我这边的环境也是无界面启动的话,定位元素“笔记本”失败

0
0

大周

2020-02-07

你这个是定位超时了。 没有找到这个元素。 但是仅仅看这个看不出来到底哪的问题。 你可以到群里喊我。 抽时间仔细看一下

0
1
weixin_慕雪2209780
就是找不到悬浮框的元素
2020-02-09
共1条回复

UI自动化测试经典项目实战 强化编程能力

从测试到测试开发的“快速通道”,让你掌握代码开发能力

298 学习 · 107 问题

查看课程