vidaLL Posted July 18, 2013 Share Posted July 18, 2013 Hello all.. Is there any way to save a document through the object? E.g $o_form = _IEFormGetObjByName($oIE, "Form1");Form1_ctl0 $o_btnSair = _IEFormElementGetObjByName($o_form, "btnSair") $o_gareLink = _IEFormElementGetObjByName($o_form, "gareLink") The "gareLink" is the object. I tryied InetGet but didnt work to this case, because each time will be a different name of the document (link to download) Link to comment Share on other sites More sharing options...
Danp2 Posted July 19, 2013 Share Posted July 19, 2013 What is the value of $o_gareLink.href? It also might help if you further explained what you tried with InetGet. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
vidaLL Posted July 19, 2013 Author Share Posted July 19, 2013 What is the value of $o_gareLink.href? It also might help if you further explained what you tried with InetGet. <A id=gareLink href="guias/0_1302170653_0_010_DI_120-0_True_True.pdf">aqui</A> Whats the problem : the number 0_1302170653_0_010 will change each time that i generate a new Document. Link to comment Share on other sites More sharing options...
Danp2 Posted July 19, 2013 Share Posted July 19, 2013 I understand. However, can't you use InetGet to retrieve the file using the link's href? Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
vidaLL Posted July 19, 2013 Author Share Posted July 19, 2013 I cant see it clearly.... Func InetGet ("??????",@DocumentsCommonDir,0,0) Link to comment Share on other sites More sharing options...
vidaLL Posted July 19, 2013 Author Share Posted July 19, 2013 There's a link to : Link to comment Share on other sites More sharing options...
Danp2 Posted July 19, 2013 Share Posted July 19, 2013 The command would be: InetGet($o_gareLink.href, $destFilename) where $destFilename contains the location and name of the file to be saved. Since the href appears to be relative, you may have to determine the root portion of the site and prepend that the the href value. Not sure what the image is supposed to represent. However, it appears that you may be attempting to download this file from a secure site. If that's the case, then the InetGet will likely fail and you should probably review >this thread. Latest Webdriver UDF Release Webdriver Wiki FAQs Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now