Hello all
im new to delphi and EmbeddedWB1 , i really don't understand where is my source have problem.
very simple but can't work correctly,
my problem is in my delphi source EmbeddedWB1.ReadyState <> READYSTATE_INTERACTIVE not work
correctly. there is login form exist
in this site(http://sports.khan.co.kr/htdocs/login/login.html)
and if navigate this page, it not working correctly with
EmbeddedWB1.ReadyState <> READYSTATE_INTERACTIVE because webpage navigate too fast,
so login form element couldn't detected by Embeddedbwb1 and error happened.
anyone can help me ? what is problem? thanks in advance
begin
//WB := EmbeddedWB;
forms := EmbeddedWB1.doc2.Forms as IHTMLElementCollection;
theForm := forms.Item(0,'') as IHTMLFormElement;
EmbeddedWB1.Navigate('http://sports.khan.co.kr/htdocs/login/login.html');
while EmbeddedWB1.ReadyState <> READYSTATE_INTERACTIVE do
begin
Application.ProcessMessages;
Sleep(500);
end;
with EmbeddedWB1 do
begin
EmbeddedWB1.OleObject.Document.GetElementByID('uid').Value := 'loginid';
EmbeddedWB1.OleObject.Document.GetElementByID('upw').Value := 'password';
EmbeddedWB1.OleObject.Document.forms.item(1).submit();
end;
end;