I am new to this forum and looking for your help. I am a Software Tester and trying to build a C# program that would be logging in to the website and clicking links, inputing text and loging out.
The code below works to the point where it logs in and clicks first link, but the rest is not executed because of DocumentComplete event. Do I need to use multi-threading to continue clicks after the page loads or is there another technique? Thank you.
How exactly do you plan to get your program to automatically identify links and click on them?
Thanks for you reply!
I specify what to click based on ID or Name tags. It's not a problem. The problem is that after the page loads it clicks all the links at once. Basically what I am trying to do is:
click a link - wait for page to load - input some text - click submit - wait for page to load - click another link.
do I create another thread or another DocumentComplete event so it waits for a 2nd page to load.
I specify what to click based on ID or Name tags. It's not a problem. The problem is that after the page loads it clicks all the links at once. Basically what I am trying to do is:
click a link - wait for page to load - input some text - click submit - wait for page to load - click another link.
do I create another thread or another DocumentComplete event so it waits for a 2nd page to load.
Oh right, could you not just use the timer/sleep function to wait for a bit?
This is a block of code that does the trick when you want the webbrowser to wait until the page loads. I registered here just so I could tell you. lol.
I specify what to click based on ID or Name tags. It's not a problem. The problem is that after the page loads it clicks all the links at once. Basically what I am trying to do is:
click a link - wait for page to load - input some text - click submit - wait for page to load - click another link.
do I create another thread or another DocumentComplete event so it waits for a 2nd page to load.
What you need to do is check the URL inside DocumentComplete and based on that you perform your tasks. So you check if it's the login page, you input, click. This will redirect you to another page I assume. When the second page finishes loading, DocumentComplete gets invoked again. Check URL, and do whatever clicks. Get it?
No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.