Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A few questions
#1
Hi! I have a few questions:

1] Can I make a downloader to download files without hotlinks?

2] I've added a WebBrowser to my form but can I use WatiN on that or do I need to use Internet Explorer/Firefox?

3] I want to get the link attached to a Download button with WatiN.
#2
So it looks like what you want to do is make a program that essentially downloads the file from a download button. Well, that is definitely possible. Each button is hardlinked to a file somewhere in it's coding, so all you have to do is inspect the code in order to see what file you need to grab.

To answer your questions specifically:
1] Well, you must have some link to the file
2] The WebBrowser class has its own set of controls that will allow you to do exactly what WatiN does.
3]In order to get the link attached to a button, the first thing you will need to do is get the name of the button. This can be done by viewing the site's source code.

Then, you will have to use something like
Code:
browser.Button(Find.ByName("ButtonName")).Link()

I do not know the exact code, but it should be something along those lines.
My Blog | My Setup | My Videos | Have a wonderful day.
#3
Yes exactly! Many thanks!


Forum Jump:


Users browsing this thread: 1 Guest(s)