Hi guys, I dont quite understand the problem below.
I has a hyperlink element in HTML like this (telerik calls HTMLAnchor).
<a href="#" id="btnSubmit" >Submit</a>
Now, what I all need that I want to find the <a> element by using HTMLAnchor, then click on it.
Here is my vb code in my Telerik script
~~~~~
Dim btnSubmit As ArtOfTest.WebAii.Controls.HtmlControls.HtmlAnchor
Dim alertDialog__1 As AlertDialog = AlertDialog.CreateAlertDialog(ActiveBrowser, DialogButton.OK)
alertDialog__1.HandlerDelegate = New DialogHandlerDelegate(AddressOf MyCustomAlertHandler)
Manager.DialogMonitor.AddDialog(alertDialog__1)
ActiveBrowser.Window.SetFocus
ActiveBrowser.RefreshDomTree
btnSubmit=Manager.ActiveBrowser.Find.ById("btnSubmit")
Assert.IsNotNull(btnSubmit,"Cannot find the Submit button")
btnSubmit.Click
alertDialog__1.WaitUntilHandled(50000)
~~~~~
BUT, the problem is that btnSubmit is NULL. Look like it can not find the element
Log file:
Value of type 'ArtOfTest.WebAii.ObjectModel.Element' cannot be converted to 'ArtOfTest.WebAii.Controls.HtmlControls.HtmlAnchor'.
Any suggestion for me, guys.
Thanks