我正在尝试做一个程序,登录到我的depop (一个二手服装销售应用程序),并搜索用户。到目前为止,我已经设法让它登录了。但是,它找不到搜索按钮的元素。
我已经尝试了多种方法,但都没有奏效。请记住,我是从今天开始学习的,所以我是一个初学者。
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
from selenium.webdriver.common.keys import Keys #allows keyboard to be used
from sel
我正在尝试使用selenium 抓取下面的网页,butI总是得到相同的错误。有人知道我做错了什么吗?由于某种原因,它似乎找不到类名。我得到的错误如下
NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":".table-wrap"}
from bs4 import BeautifulSoup
from selenium import webdriver
from
尝试通过下拉列表使用Selenium来选择一个国家和州。设法让它填写一些表格,如名字,姓氏等,得到一个"selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id="7f7a846e-ce26-49f2-b60d-202ac1a355f4"]"}“错误。对是什么原因有什么建议吗?
守则如下
如何使用Python找到包含text/id/etc的链接,然后单击该元素?
我的导入:
from selenium import webdriver
from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
转到我的URL的代码:
browser = webdriver.Firefox() # Get local session of firefox
browser.get(myURL) # Load page
#right here
我刚刚开始使用Selenium Webdriver,并且我直接遇到了一个问题,涉及我试图选择/单击的按钮,它们都没有I,并且共享同一个类。
所以我想知道如何通过它们包含的独特文本来选择它们。
我想可能有css选择器,但我不确定如何告诉它寻找特定的文本来选择元素。
我目前所拥有的是:
using OpenQA.Selenium;
using OpenQA.Selenium.Firefox;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threa
我正在使用Python,但是在上刮了一个试图向下滚动的页面,直到Selenium找到了经典的“显示更多”按钮(似乎是隐藏的)。
到目前为止,我所做的是:
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from seleniu
我正在使用黄瓜和水豚来测试一个带有以下轮廓的网页。
<span> Title 1 </span>
<span> Some text </span>
<div> link Y </div>
<span> Title 2 </span>
<span> Some text </span>
<div> link Y </div>
<span> Title 3 </span>
<span> Some text </spa
当我运行我的代码错误时,错误如下:
org.openqa.selenium.nosuchelementexception: no such element: unable to locate element method cssSelector
我已经更改了chrome驱动程序版本并设置了javadoc路径
错误是:
org.openqa.selenium.nosuchelementexception: no such element: unable to locate element method cssSelector
实际结果是正确运行页面。
代码试验:
package com.w2
我对这条巨蟒和硒世界非常陌生。试图使用selenium自动使用python来实现一些无聊的东西。我对下面的xpath有问题。看来"="把事情搞砸了。
有人能帮忙吗?
L = driver.find_element_by_xpath("//*[@id="ext-comp-1016"]/div[1]/table/tbody/tr/td[2]/div[1]").click()
selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to l
我正在尝试使用python中的selenium在facebook上发布信息。我可以登录,但登录后找不到我从浏览器复制的状态框的类名。
这是我的密码-
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time
user_name = "email"
password = "password"
msg = "hi i am new here"
driver = webdriver.Firefox()
driver.get
我用python和selenium一起编写了一些代码,从一个名为"49°57'09"N (49.952500)的网站上抓取“纬度”,但出于某种原因,我得到了TimeoutException。我不知道我是从哪里脱轨的。任何有关这方面的输入都会受到极大的赞赏。
我正在尝试的剧本:
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webd
嗨,试图从页面获取文本,但无法获得与selenium这里是我的代码,我想从网页复制文本,我的其他xath元素工作,只是这个得到的错误,请帮助我解决这个问题这里是屏幕截图
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditio