Python Forum

Full Version: Python Selenium .click() Loads Error - Works Manually.- Events not Triggered
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
I was able to create the account...

I will pm you the details.
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.
wow... the thought of simply going back never crossed my mind.

Do you know what the cause of that error is via selenium?
(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.
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!
Pages: 1 2 3