私信  •  关注

Corey Goldberg

Corey Goldberg 最近创建的主题
Corey Goldberg 最近回复了
4 年前
回复了 Corey Goldberg 创建的主题 » 我不能用Python Selenium单击元素

有没有办法在全球范围内设置默认时间间隔,

是的,这正是设置隐式等待的作用。隐式等待用于WebDriver的生命周期。

例子:

driver.implicitly_wait(10)

信息:

5 年前
回复了 Corey Goldberg 创建的主题 » Selenium/Python TypeError:“WebElement”对象不可iterable

错误很明显。。。 find_element_by_xpath 是一个 WebElement . 你不能重复 ...

element = driver.find_element_by_class_name("test")
print(element.text)
4 年前
回复了 Corey Goldberg 创建的主题 » 通过Selenium在Python中使用变量运行execute_脚本

可以使用字符串格式将值放入字符串中:

script = "alert('{}')".format(keyy)
driver.execute_script(script)

python stdlib

5 年前
回复了 Corey Goldberg 创建的主题 » python,pip,为line profiler构建轮子失败[重复]

错误很明显:

error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools": http://landinghub.visualstudio.com/visual-cpp-build-tools

我假设您没有安装微软VisualC++构建工具。

(工作链接为: https://visualstudio.microsoft.com/visual-cpp-build-tools/ )