How can I click on a radio form in a Twebbrowser?
I have a button like this:
Quelltext
1:
| <INPUT TYPE=radio NAME=rating VALUE=5 onClick="if(pressed.value==0){pressed.value=1;this.form.submit()}"> |
I know how to slect it :
Delphi-Quelltext
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18:
| var Document: IHTMLDocument2; rbTestList: IHTMLElementCollection; rbTest: IHTMLOptionButtonElement; I: Integer; begin Document := WebBrowser1.Document as IHTMLDocument2; rbTestList := Document.all.item('rating', EmptyParam) as IHTMLElementCollection; for I := 0 to rbTestList.Length - 1 do begin rbTest := rbTestList.item(I, EmptyParam) as IHTMLOptionButtonElement; end; for I := 0 to rbTestList.Length - 1 do begin rbTest := rbTestList.item(I, EmptyParam) as IHTMLOptionButtonElement; if rbTest.Value = '5' then rbTest.Checked := True; end; |
BUT I CAN`T GET the javascript working... Please help me...