bbawj / SSDC-Autobooker

A python-selenium script built to automate the booking of practical lessons from the Singapore Safety Driving Center website
https://bbawj.github.io/SSDC-Autobooker/
8 stars 7 forks source link

Unknown #3

Open hnrykrnia opened 3 years ago

hnrykrnia commented 3 years ago

Traceback (most recent call last): File "c:\Users\18023856\Desktop\SSDC\SSDC-Autobooker-master\script.py", line 164, in loc_select = Select(driver.find_element_by_id('SelectedLocation')) File "C:\Users\18023856\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 360, in find_element_by_id return self.findelement(by=By.ID, value=id) File "C:\Users\18023856\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 976, in find_element return self.execute(Command.FIND_ELEMENT, { File "C:\Users\18023856\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 321, in execute self.error_handler.check_response(response) File "C:\Users\18023856\AppData\Local\Programs\Python\Python39\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"css selector","selector":"[id="SelectedLocation"]"} (Session info: chrome=91.0.4472.77)

bbawj commented 3 years ago

Hi! Sorry but as I no longer have access to the site I will no longer be able to maintain this script

hnrykrnia commented 3 years ago

aw man, it’s such an excellent script! just needing a few tweaks which i’m no expert at. do you happen to have an updated script?

On Wed, 9 Jun 2021 at 8:18 PM, Brendan @.***> wrote:

Hi! Sorry but as I no longer have access to the site I will no longer be able to maintain this script

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bbawj/SSDC-Autobooker/issues/3#issuecomment-857645967, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUNG3KE4MYASWA35CNVXUJ3TR5L27ANCNFSM46L3QFDQ .

-- Hendrry Kurnia

jasonyee2 commented 3 years ago

Hey, I think many of us here in the community would love it if you made the tweak! I have also encountered a similar error:

ElementNotInteractableException Traceback (most recent call last)

in 61 except TimeoutException: 62 break ---> 63 driver.find_element_by_xpath("//a[@href='/User/Booking/BookingList']").click() 64 driver.find_element_by_link_text('New Booking').click() 65 driver.find_element_by_id("chkProceed").click() ~\Anaconda3\lib\site-packages\selenium\webdriver\remote\webelement.py in click(self) 78 def click(self): 79 """Clicks the element.""" ---> 80 self._execute(Command.CLICK_ELEMENT) 81 82 def submit(self): ~\Anaconda3\lib\site-packages\selenium\webdriver\remote\webelement.py in _execute(self, command, params) 631 params = {} 632 params['id'] = self._id --> 633 return self._parent.execute(command, params) 634 635 def find_element(self, by=By.ID, value=None): ~\Anaconda3\lib\site-packages\selenium\webdriver\remote\webdriver.py in execute(self, driver_command, params) 319 response = self.command_executor.execute(driver_command, params) 320 if response: --> 321 self.error_handler.check_response(response) 322 response['value'] = self._unwrap_value( 323 response.get('value', None)) ~\Anaconda3\lib\site-packages\selenium\webdriver\remote\errorhandler.py in check_response(self, response) 240 alert_text = value['alert'].get('text') 241 raise exception_class(message, screen, stacktrace, alert_text) --> 242 raise exception_class(message, screen, stacktrace) 243 244 def _value_or_default(self, obj, key, default): ElementNotInteractableException: Message: element not interactable (Session info: chrome=91.0.4472.114) I would gladly share my account information with you (with a generic password) for this to be resolved. this is a superb little script that is so unfortunate to be left in this state (and i'm no coder...) Thanks!
jasonyee2 commented 3 years ago

i think i have to mention that mine is for class 2b license. not sure if that helps