Question

I want to InvokeMember("Click") in awesomium

i can do this when i have elementid or elementtag with somthing like this ;

JSObject document = webView.ExecuteJavascriptWithResult( "document" );

if ( document == null )
    return;

using ( document )
{
    JSObject signin = document.Invoke( "getElementById", "signin" );

    if ( signin == null )
        return;

    using ( signin )
        signin.InvokeAsync( "click" );
}

but i want to that when i have not any element , i need only Invoke "Click" in webpage for running java script code which opening pop up page with mouse click....

have any solution ?

Was it helpful?

Solution

Use jQuery:

webView.ExecuteJavascript(@"$('#signin').trigger('click');");
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top