|
-
Jul 3rd, 2017, 08:38 PM
#1
Thread Starter
Member
-
Jul 3rd, 2017, 08:45 PM
#2
Re: How to handle Multiple Task Properly?
I'm afraid that your question is rather too vague to give much meaningful advice but there's every chance that the way you're using a Timer or even that you're using a Timer at all is the issue. We'd have to know far more about the specifics though.
-
Jul 3rd, 2017, 08:58 PM
#3
Thread Starter
Member
Re: How to handle Multiple Task Properly?
Ok, Let me Make it clear. I have to Fillup form and Click Register button. After clicking Register button I simply disable the Timer untile getting the registration response because IF I Enable Timer It clicks Register Button Frequently. In this circumastances, due to slow Internet connection I have to wait 20/30 seconds Or even more than 1/2 minutes to get any response. But unluckly If It does not Get response It would Remain stuck. So, My Question is: IS timer best option for this type of Browser Automation?
 please 
-
Jul 3rd, 2017, 09:12 PM
#4
Re: How to handle Multiple Task Properly?
Are you talking about a WebBrowser control in your own form? That's rather pertinent information.
-
Jul 3rd, 2017, 09:22 PM
#5
Thread Starter
Member
Re: How to handle Multiple Task Properly?
Yes, I'm using GeckoFX 33.0.
 please 
-
Jul 3rd, 2017, 09:28 PM
#6
Re: How to handle Multiple Task Properly?
 Originally Posted by buzz4rd
Yes, I'm using GeckoFX 33.0.
That would fall under the category of "specifics". I've never used that control so I can't really help much further with it specifically but I will say that the standard WebBrowser control has a DocumentCompleted event that notifies you when a page has finished loading so you should probably look for something similar in the control you are using.
That said, if there's a chance that you might not get such an event because a page fails to load then you probably should use a Timer, but not in the way that you currently are. Each time you perform an action that navigates to another page, you could start a Timer as a failsafe. If you get a DocumentCompleted event or the like before the Timer Ticks then you Stop the Timer and perform the next action. If the Timer Ticks first then you would consider the action to have timed out and you can then proceed accordingly. It's up to you to set the Interval of the Timer to a suitable value for the timeout on each action.
-
Jul 3rd, 2017, 09:36 PM
#7
Thread Starter
Member
Re: How to handle Multiple Task Properly?
Thank you. Actually, I'm also using DocumentCompleted event in Gecko. It's much More Advance than IE. But sometimes it stucks. It's not Just registration there are many Tasks after Registration. That's why I'm looking for proper solution.
 please 
-
Jul 3rd, 2017, 09:50 PM
#8
Re: How to handle Multiple Task Properly?
The DocumentCompleted event is the way to determine that a document has loaded. If there's no event that indicates that a document has failed to load then you would use a Timer to create your own timeout mechanism. That's basically it.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|