现在服务使用硒(动态网络刮擦)的网络刮擦
是否有人有任何解决方法可以在硒中选择动态内容?
我有一个不会被选中的特定标签。我尝试通过以下方式选择元素:class,link_text,xpath等。我尝试为每项动作放慢脚本。例如;输入用户名,等待10秒,选择登录,等待10秒,输入密码,等待10秒。等等。
该项目是可以手动单击的,但我当然是使用自动化。欢迎任何建议。我已经在破裂的时间附加了代码。希望我的问题有意义。 程序工作流程:
立即登录服务
打开有关未分配的备份日志的特定过滤队列
在队列中处理每个未分配的备份日志。
如果队列中没有日志,请等待15分钟,然后在刷新网络浏览器后重复步骤3。
def Process_asigra_ticket(self):
- 在未分配的队列中打开1个ASIGRA票,并作为服务台代理进行处理,是否会在日志中输出erorrs。
- 请注意未分配的队列中处理的每个机票的INC,并将Loggin消息发送到团队频道。
- MS Teams频道以后可用于审核脚本的运作方式。如果
       
driver = self.driver
虽然是正确的:
try:
first_incident = WebDriverWait(driver, 7).until(EC.element_to_be_clickable((By.CLASS_NAME, "linked formlink"))) # code won't select this icon for the life of it
time.sleep()
first_incident.click()
我正在收到以下错误消息:
提高timeoutexception(消息,屏幕,stacktrace) selenium.common.exceptions.TimeOutException:消息:
Does anyone have any workarounds for selecting dynamic content within Selenium?
I have a particular tag that just won't get selected. I have tried selecting the element by: class, link_text, xpath and more. I have tried slowing down the script for every action taken. For example; enter username, wait 10 seconds, select logon, wait 10 seconds, enter password, wait 10 seconds. etc.
The item is clickable manually, but of course my aim is to use automation. Any advice would be welcome. I have attached my code at the point where it breaks. Hope my question makes sense.
Program workflow:
Log into service now
Open a specific filtered queue of incidents concerning backup logs that are unassigned
Process each unassigned backup log in the queue.
If there are no logs in the queue, wait 15 minutes and repeat step 3 after refreshing the web browser.
def process_asigra_ticket(self):
- Opens 1 asigra ticket in the unassigned queue and processes it as a service desk agent would do whether erorrs are outputted in a log or not.
- Takes note of the INC for each ticket processed in the unassigned queue and sends a loggin message to a teams channel.
- MS teams channel can later be used for auditing how the script has functioned. If
driver = self.driver
while True:
try:
first_incident = WebDriverWait(driver, 7).until(EC.element_to_be_clickable((By.CLASS_NAME, "linked formlink"))) # code won't select this icon for the life of it
time.sleep()
first_incident.click()
I'm receiving the following error message:
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论