error sumbitting IE form (1 Viewer)

cpampas

Registered User.
Local time
Today, 01:37
Joined
Jul 23, 2012
Messages
73
Hello
I am downloading data from the the web, and sometimes I get an error, I suppose from the browser when clicking a button :

ie.Document.getElementById("btn-search-header").Click
the alert box error says : "error submitting form"

is there a way to disable this message error . If I manually click ok, in the alert box the code resumes just fine
 

theDBguy

I’m here to help
Staff member
Local time
Today, 01:37
Joined
Oct 29, 2018
Messages
13,740
Hi. Clicking a button on a web form usually/sometimes executes a function. If that's also the case for the website you're trying to manipulate, have you tried calling the function instead of using the Click method?
 

cpampas

Registered User.
Local time
Today, 01:37
Joined
Jul 23, 2012
Messages
73
Hi, I am not sure the button executes a function. I guess not, because this is the html in that button element :

<button type="button" class="btn primary-button" id="btn-search-header">Pesquisa</button>
 

Isaac

Lifelong Learner
Local time
Today, 01:37
Joined
Mar 14, 2017
Messages
3,293
What about switching to something like:
ie.Document.Forms(1).Submit
 

cpampas

Registered User.
Local time
Today, 01:37
Joined
Jul 23, 2012
Messages
73
huummm,
neither ie.Document.Forms(1).Submit or ie.Document.Forms(0).Submit
manage to submit the form.

I was wondering if it is posible to catch the alert, and right after sendkeys(enter), to resume the code
if you think this would be a posibility, how can I catch that alert ?
 

Users who are viewing this thread

Top Bottom