Giter VIP home page Giter VIP logo

Comments (12)

guoty1991 avatar guoty1991 commented on July 20, 2024

请问您预约成功了吗?我现在在调试程序,可以成功登陆,但是可能因为约满了的缘故程序后续就没有任何反应了,登陆成功后首先要自己点掉那个弹出框程序,才会继续预约吗?

现在登录之后有一个提示框了,需要先确认的

from jiankangyizhan.

xhk777 avatar xhk777 commented on July 20, 2024

是的

from jiankangyizhan.

guoty1991 avatar guoty1991 commented on July 20, 2024

好的 多谢

from jiankangyizhan.

01miaom avatar 01miaom commented on July 20, 2024

你可以尝试用以下代码关闭弹出窗口:
browser.find_element_by_xpath("//button[text()=\"確定\"]").click()

from jiankangyizhan.

Andy3117006664 avatar Andy3117006664 commented on July 20, 2024

你可以尝试用以下代码关闭弹出窗口: browser.find_element_by_xpath("//button[text()=\"確定\"]").click()

这个还是有问题啊

image

from jiankangyizhan.

01miaom avatar 01miaom commented on July 20, 2024

你可以尝试用以下代码关闭弹出窗口: browser.find_element_by_xpath("//button[text()=\"確定\"]").click()

这个还是有问题啊

image

我没有成功复现这个错误,从报错上看可能和网页没有加载完全有关。脚本在无法捕捉到对应的可交互元素会出现类似错误。在执行这行代码的时候浏览器加载完全并出现弹窗吗?

from jiankangyizhan.

Andy3117006664 avatar Andy3117006664 commented on July 20, 2024

对,出现弹筐了。
还有别的方法定位这个button吗?

from jiankangyizhan.

Andy3117006664 avatar Andy3117006664 commented on July 20, 2024

image

from jiankangyizhan.

01miaom avatar 01miaom commented on July 20, 2024

可以尝试用以下方法定位并点击元素:
browser.find_element_by_xpath('//div[@class="flex1"]/button').click()

from jiankangyizhan.

Jazzwind avatar Jazzwind commented on July 20, 2024

可能是需要让程序暂停1秒。我自己试了一下,如果太快的话就会报错,等一下就好了,反正是可以提前登录的,等个2,3秒没有影响

from jiankangyizhan.

chpagy avatar chpagy commented on July 20, 2024

browser.find_element(By.XPATH,"//button[text()="確定"]").click()

selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable

from jiankangyizhan.

01miaom avatar 01miaom commented on July 20, 2024

browser.find_element(By.XPATH,"//button[text()="確定"]").click()

selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable

这个问题可能是页面没有完全加载导致的,可以尝试在在browser.get()后面增加time.sleep(0.5),或者在网络环境更好的地方运行脚本

from jiankangyizhan.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.