以下链接中的网页截图:
我试图在select元素中选择一个选项标签,但是我得到了一条错误消息,表示元素不能滚动到视图中。
selenium.common.exceptions.ElementNotVisibleException: Message: element not interactable: Element is not currently visible and may not be manipulated (Session info: chrome=71.0.3578.98)
代码:
dropdown = Select(driver.find_element_by_id(
我正在尝试从中选择一个选项
但是我发现了一个错误:
selenium.common.exceptions.ElementNotVisibleException: Message: element not interactable: Element is not currently visible and may not be manipulated
在这一行
Brands.select_by_visible_text('BMW')
这是我的剧本:
from selenium.webdriver.support.ui import Select
from selenium.web
我正在尝试用登录到一个网页。我已经找到了一个元素,并且启用了它,但是当我尝试对它进行send_keys()时,我会得到一个错误。错误输出的主要内容(我认为)是
selenium.common.exceptions.ElementNotVisibleException: Message: Element is not currently visible and so may not be interacted with
我的代码是
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
我得到了这个错误:
selenium.common.exceptions.ElementNotVisibleException: Message: element not visible. or Element is not currently interactable.
我该怎么解决呢?
要素:
input class="artfld col-all-min ng-pristine ng-invalid ng-touched" formcontrolname="id" maxlength="10" placeholder="身分證字號&
我在一个站点上测试一个登录名,它有一个标准的用户名条目和一个隐藏的密码输入。我选择用户名并发送字符串。我无法选择密码框,因为是selenium.common.exceptions.ElementNotVisibleException: Message: element not visible,所以我这样做:
login = driver.find_element_by_xpath('/html/body/div/div/div/div/div/div/div/div/input[1]')
login.send_keys(foo)
login.send_keys(Keys.TAB
通过,我得到了一些硒的工作:
import contextlib
from selenium import webdriver
with contextlib.closing(webdriver.Chrome()) as driver:
driver.get("http://www.bing.com/images")
driver.find_element_by_id("sbi_t").click()
element = driver.find_element_by_id("sbi_file_upload")
e
我试图使用Python和selenium web驱动程序在html页面上单击一个按钮。
这是页面的源代码。
编辑:相关部分在结尾处。"btn btn-小学“
我真的快弄明白了:类名里面有空格,我用点代替了空格.这使得它发挥了作用(感谢另一个如此的帖子)。
driver.find_element_by_css_selector(".btn.btn-primary").click()
现在我得到的错误是:
selenium.common.exceptions.ElementNotVisibleException: Message: Element is not curren
我正试图通过selenium和python登录网页,但目前没有运气。为了进行注销,我需要点击网页右上角的链接,它将有一个小的下拉窗口打开,然后我可以点击这个下拉窗口内的“注销”图标。这是这张下拉窗口的照片。
以及下拉窗口中此注销图标的检查代码。
现在,在我的python代码中,我能够打开下拉窗口,但是如果我要单击注销图标,我就会得到"selenium.common.exceptions.ElementNotVisibleException".的例外。
这是我的代码:
try:
# to click the link so that the drop-do
我有这个。我必须点击Facebook图标。在做这件事后,我得到:
selenium.common.exceptions.ElementNotVisibleException: Message: Element is not currently visible and so may not be interacted with
守则如下:
if 'log' in html.lower():
print("not logged in")
sleep(3)
#Click on Fb button
fb_e
我试图弄清楚如何使用selenium来执行下一页单击新闻发布页面。这是我的代码,将转到正确的网站,并执行搜索,以获得正确的新闻发布文章主题页。此站点配置为在执行搜索后,要查看第1页上的每一篇新闻稿,还必须在页面底部选择“更多的新闻结果”按钮。我能够到达完整的第一页新闻部分,没有问题。下面是执行搜索和页面单击的代码。
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_condit
我正在进行一个程序,它将帮助我选择位于窗口右上角的下拉菜单中的第二个选项。到目前为止,这是我的代码:
import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.support import ui
driver = webdriver.Chrome()
driver.get('https://www.pcfinancial.ca/');
driver.find_element_by_xpath('
因此,我知道当我在Django设置中调试为False时,Selenium无法访问静态文件,结果如下所示:
但是,当我运行我的Selenium测试时,不管它们是否能够与DOM交互,并从下拉列表中选择项!我现有的测试代码是
from selenium.webdriver import Chrome
from selenium.webdriver.support.ui import Select
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredC