繁体   English   中英

Selenium 错误 - 它没有输入我的名字

[英]Selenium error - it does not type my name

这是我第一次使用 python,我遇到了一些问题。 我想自动化 webex(自动加入会议),但我无法通过此页面: https://i.stack.imgur.com/kuaLI.png (它没有输入我的名字)并且我收到此错误: https: //i.stack.imgur.com/yPeon.png

以下是我遇到的问题:

错误代码

不输入框我也告诉它

这是我到目前为止所写的:

 import pytest import time import json from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.action_chains import ActionChains from selenium.webdriver.support import expected_conditions from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.common.keys import Keys from selenium.webdriver.common.desired_capabilities import DesiredCapabilities from selenium.webdriver.chrome.service import Service service = Service(r"chromedriver.exe") service.start() driver = webdriver.Remote(service.service_url) driver.get('https://meetingsemea39.webex.com/meet/pr1812997966'); driver.find_element(By.ID, "push_download_join_by_browser").click() time.sleep (6) driver.find_element(By.CSS_SELECTOR, ".style-name-input-19PlX >.style-input-2nuAk").click() time.sleep (3) driver.find_element(By.CSS_SELECTOR, ".style-name-input-19PlX >.style-input-2nuAk").send_keys("Thanashs Ntouvlis") driver.find_element(By.ID, "guest_next-btn").click() driver.find_element(By.CSS_SELECTOR, ".style-audio-case-3xwDo").click() driver.find_element(By.ID, "interstitial_join_btn").click()

我无法找到如何为您提供页面源代码,但这是网址( https://meetingsemea39.webex.com/meet/pr1812997966 )。 只需从浏览器中按加入,您将在同一页面上。

您正在尝试通过 CSS_SELECTOR 查找元素,但 style-input-2nuAk 是 class,而不是 CSS 元素。 通过 class 名称查找元素: driver.find_element_by_class_name("class_name")

它仍然没有在框中输入

您正在尝试通过 CSS_SELECTOR 查找元素,但style-input-2nuAk是 class,而不是 CSS 元素。

按 class 名称查找元素:

driver.find_element_by_class_name("class_name")

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM