Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What am I doing wrong?
#1
I'm trying to wait for browser to see the first part of a string using:
            ltext = f"Page {sw['current_page']}"
            element = WebDriverWait(self.browser, delay).until( \
                EC.presence_of_element_located((By.PARTIAL_LINK_TEXT(ltext))))
value of sw['current_page'] is 2, so ltext is 'Page 2'
the page text is: 'Page 2 of 76, records 26 to 50 of 1878'
URL: https://bizfilings.vermont.gov/online/BusinessInquire/

receiving the following error:
Error:
Traceback (most recent call last): File ".../src/Vermont/ScrapeVermontBusinesses.py", line 178, in <module> main() File ".../src/Vermont/ScrapeVermontBusinesses.py", line 175, in main svb.dispatch() File ".../src/Vermont/ScrapeVermontBusinesses.py", line 50, in dispatch self.get_main_page() File ".../src/Vermont/ScrapeVermontBusinesses.py", line 91, in get_main_page EC.presence_of_element_located((By.PARTIAL_LINK_TEXT(ltext)))) TypeError: 'str' object is not callable
Waiting on Partial text is new to me, what am I doing wrong?
Reply


Messages In This Thread
What am I doing wrong? - by Larz60+ - Apr-28-2022, 11:13 PM
RE: What am I doing wrong? - by DeaD_EyE - Apr-29-2022, 06:35 AM
RE: What am I doing wrong? - by Larz60+ - Apr-29-2022, 12:11 PM

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,605 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