BP Forums
A few questions - Printable Version

+- BP Forums (https://bpforums.info)
+-- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=55)
+--- Forum: Archived Forums (https://bpforums.info/forumdisplay.php?fid=56)
+---- Forum: VB.NET (Visual Basic 2010/2008) (https://bpforums.info/forumdisplay.php?fid=8)
+----- Forum: Programming Help (https://bpforums.info/forumdisplay.php?fid=9)
+----- Thread: A few questions (/showthread.php?tid=572)



A few questions - brco900033 - 07-19-2012

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.


Re: A few questions - brandonio21 - 07-19-2012

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.


Re: A few questions - brco900033 - 07-21-2012

Yes exactly! Many thanks!