in VB automation, need a WebBrowser object to click on a link in an iframe
$30-100 USD
Kansellert
Lagt ut over 12 år siden
$30-100 USD
Betalt ved levering
I have a VB app with a form that contains a [login to view URL] object.
I know how to make the WebBrowser object navigate to a page and click a link on that page:
[login to view URL]("<[login to view URL]>")
BennettWait(10)
HtmlDoc = CType([login to view URL], HtmlDocument)
HtmlElem = [login to view URL]("mylink")
[login to view URL]("click")
BennettWait(10)
("BennettWait" is just a function I wrote that waits for 10 seconds without causing the app to stop responding.)
Now, how do I make the WebBrowser object navigate to this page:
<[login to view URL]>
and click the link inside of the iframe?
Something like this:
HtmlElem = [login to view URL]("link_iframe").GetElementById("mylink)
[login to view URL]("click")
except that doesn't compile because the first call to GetElementById returns an HtmlElem object, and the second call to GetElementById doesn't compile because it's not a member function of HtmlElem.
Just looking for a snippet of code that demonstrates how to do it right. Can use either a code snippet or a full-fledged VB project file that builds in VS 2010 and demonstrates the code. But PLEASE TEST IT YOURSELF FIRST, DO NOT GUESS :) I don't want to message back and forth eight times saying "I tried that, it did not work" and getting back "Well try this then". PLEASE TEST IT :)
Thanks, if you can spot the solution easily, I'd love to hear from you!