I have a DropDownExtender that is an ajax postback control. I believe my script is breaking because the import has not finished and waiting for the first element does not seem to work. I have found this link:
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/code-samples/html/ajax-postback.aspx
From that link I tried entering the following line of code in an existing function by Customizing step in code:
However, I get the following errors:
Line 107: (BC30205) End of statement expected.
Line 108: (BC30035) Syntax error.
Line 109: (BC30647) 'Return' statement in a Sub or a Set cannot return a value.
Line 109: (BC30037) Character is not valid.
Line 110: (BC30035) Syntax error.
Line 113: (BC30429) 'End Sub' must be preceded by a matching 'Sub'.
Here is the code in view class:
<CodedStep("Wait for Ajax")> Public Sub WaitAjax()
public bool ActiveAjaxConnections()
{
return Actions.InvokeScript<bool>("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack()");
}
End Sub
What am I doing wrong?
http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/code-samples/html/ajax-postback.aspx
From that link I tried entering the following line of code in an existing function by Customizing step in code:
public
bool
ActiveAjaxConnections()
{
return
Actions.InvokeScript<
bool
>(
"Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack()"
);
}
However, I get the following errors:
Line 107: (BC30205) End of statement expected.
Line 108: (BC30035) Syntax error.
Line 109: (BC30647) 'Return' statement in a Sub or a Set cannot return a value.
Line 109: (BC30037) Character is not valid.
Line 110: (BC30035) Syntax error.
Line 113: (BC30429) 'End Sub' must be preceded by a matching 'Sub'.
Here is the code in view class:
<CodedStep("Wait for Ajax")> Public Sub WaitAjax()
public bool ActiveAjaxConnections()
{
return Actions.InvokeScript<bool>("Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack()");
}
End Sub
What am I doing wrong?