j.neto233 Posted January 22, 2015 Share Posted January 22, 2015 Hello. I need automatically fill in web forms, fill in the fields, perform the functions of the buttons, logging in automatically on a page. must also read the result of a form. In Delphi i use the TWebBrowser that does the job perfectly. I'm having trouble using the TUniURLFrame. someone help me, or know if it is possible to do this with TUniURLFrame? Quote Link to comment Share on other sites More sharing options...
j.neto233 Posted January 23, 2015 Author Share Posted January 23, 2015 In Delphi with TWebBrowser works well: sample: PROCEDURE TForm1.Button1Click(Sender: TObject); VAR Doc3: IHTMLDocument3; BEGIN WebBrowser1.Navigate('https://pt-br.facebook.com/'); hold up ... Doc3 := Webbrowser1.Document AS IHTMLDocument3; Doc3.getElementById('email').setAttribute('value', 'neto@hotmail.com', 0); Doc3.getElementById('pass').setAttribute('value', 'pAsswOrd', 0); WebBrowser1.OleObject.Document.all.Item('loginbutton', 0).click; WebBrowser1.Silent; END; Anyone have any idea how to do this UniGUI? Quote Link to comment Share on other sites More sharing options...
zilav Posted January 23, 2015 Share Posted January 23, 2015 TWebBrowser is actually OLE browser window, it can't be used on server. UniGUI is server side library. And you did it wrong even with TWebBrowser. It works, but it's horrible. Instead you check GET/POST url address of a form and parameters names, then use Indy library to perform this operation, get back html page in a string and parse it for needed data. And that method can be done on the server inside unigui app too. 1 Quote Link to comment Share on other sites More sharing options...
j.neto233 Posted January 24, 2015 Author Share Posted January 24, 2015 ok, zilav grateful. modified the example to log in "facebook", could send me an example of how to do this with Indy components? Quote Link to comment Share on other sites More sharing options...
juniorcsa Posted June 5, 2015 Share Posted June 5, 2015 How to obtain the html code of a page open in UniURLFrame1.URL.example:// Loading the siteUniURLFrame1.URL:='http://www.nfe.fazen...do=XbSeqxE8pl8='// Getting html code site after being loadedUniMemo1.text: = UniURLFrame1.html.text;My problem is getting the code, someone can help me with this? 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.