Python Forum
I can't understand what's wrong with me? please help me!!!
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
I can't understand what's wrong with me? please help me!!!
#1
I consider about this problem for 3days, and I can't find the reason.
url:http://www.globalinterpark.com/detail/ed...spNo=01003
My code as follows:
from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from bs4 import BeautifulSoup

driver = webdriver.Chrome()
wait = WebDriverWait(driver, 10)
def open_concert():
    print("open")
    driver.get(tickets_url)
    driver.get(tickets_url)
    wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, "body > div > div > div.wrap_Pinfo > div.bak > div.Py_Time > div.Date_Select > div.btn_Booking > img"))).click()
    log("successful")
if __name__=="__main__":
    log("start")
    open_concert()
wrong information as follows:
Error:
Traceback (most recent call last): File "D:/PycharmProjects/interpark抢票程序/venv/self.py", line 74, in <module> open_concert() File "D:/PycharmProjects/interpark抢票程序/venv/self.py", line 67, in open_concert wait.until(EC.presence_of_element_located((By.CSS_SELECTOR, "body > div > div > div.wrap_Pinfo > div.bak > div.Py_Time > div.Date_Select > div.btn_Booking > img"))).click() File "C:\Python36\lib\site-packages\selenium\webdriver\support\wait.py", line 80, in until raise TimeoutException(message, screen, stacktrace) selenium.common.exceptions.TimeoutException: Message:
I am waiting for your answer!!!! thank you!!!!!
Reply
#2
The traceback refers to lines 74 in open_concert, 67 in open_concert, and finally 80 in wait.py,
the line numbers in open_concert don't correspond to the code you are showing.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Django serving wrong template at the wrong address with malformed urls.py (redactor a Drone4four 2 2,516 Aug-17-2020, 01:09 PM
Last Post: Drone4four

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020