Python Forum
Python Selenium .click() Loads Error - Works Manually.- Events not Triggered - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html)
+--- Thread: Python Selenium .click() Loads Error - Works Manually.- Events not Triggered (/thread-20104.html)

Pages: 1 2 3


RE: Python Selenium .click() Loads Error - Works Manually.- Events not Triggered - NSearch - Aug-10-2019

I was able to create the account...

I will pm you the details.


RE: Python Selenium .click() Loads Error - Works Manually.- Events not Triggered - snippsat - Aug-11-2019

Hi did a test with code in PM.
The error that always get after enter Tracking Number,after error go back driver.execute_script("window.history.go(-1)").
Now do a new submit and it work when i test.
driver.find_element_by_id('requestGSR_trackingNumber').send_keys(Keys.RETURN)
time.sleep(5)
driver.execute_script("window.history.go(-1)")
time.sleep(5)
submit = driver.find_element_by_id("requestGSR_0")
submit.click()
time.sleep(5)
message = driver.find_elements_by_css_selector('#errorMessage > span')
print(message[0].text)
Output:
This package is not eligible for a service refund. Service refund requests must be submitted within 15 days of the scheduled delivery date. (EBIL_500)
Do not need all sleep maybe first so get error can try to remove them,just that easier to track what happens when i look at this for first time.
Look at Waits for a more correct way to wait.


RE: Python Selenium .click() Loads Error - Works Manually.- Events not Triggered - metulburr - Aug-11-2019

wow... the thought of simply going back never crossed my mind.

Do you know what the cause of that error is via selenium?


RE: Python Selenium .click() Loads Error - Works Manually.- Events not Triggered - snippsat - Aug-12-2019

(Aug-11-2019, 11:14 PM)metulburr Wrote: Do you know what the cause of that error is via selenium?
No,it was doing something like auto submit that was wrong.
Going back then doing own submit did the trick.


RE: Python Selenium .click() Loads Error - Works Manually.- Events not Triggered - NSearch - Aug-14-2019

snippsat,

Sorry for the delayed response, I am just getting back to this. Thank you very much!!

It works on my end and is a great solution.

metulburr, thank you for your help!