Hi im programming in WPF/C# and using awesomium WebControl
I'm trying to click in this:
<li class="playlist-item-favorite" data-title="Ulubione" data-is-private="False">
<a href="javascript: void(0);">
<span class="playlist-title">
Ulubione
<span class="playlist-video-count-container">
(<span class="playlist-video-count">1</span>)
</span>
</span>
<span class="playlist-public-private">
Publiczny
</span>
</a>
</li>
My code C#:
dynamic lists = (JSObject)Browser.ExecuteJavascriptWithResult("document.getElementsByClassName('playlist-item-favorite')");
if (lists == null)
return;
length = lists.length;
if (length == 0)
return;
using (lists)
{
using (JSObject obiekt = lists.Invoke("item", 0))
obiekt.InvokeAsync("click");
}
}
I know i've found this object, when i get atributes it was ok, but click dont work for it.
I shows methods for this object and there are no mothod like click or onclick. Methods:
insertAdjacentHTML
insertAdjacentText
insertAdjacentElement
getAttribute
setAttribute
removeAttribute
getAttributeNode
getElementsByTagName
getAttributeNS
setAttributeNS
removeAttributeNS
getElementsByTagNameNS
getAttributeNodeNS
hasAttribute
hasAttributeNS
focus
blur
scrollIntoView
scrollIntoViewIfNeeded
scrollByLines
scrollByPages
getElementsByClassName
querySelector
querySelectorAll
webkitMatchesSelector
getClientRects
getBoundingClientRect
setAttributeNode
removeAttributeNode
setAttributeNodeNS
webkitRequestFullScreen
insertBefore
replaceChild
removeChild
appendChild
hasChildNodes
cloneNode
normalize
isSupported
hasAttributes
lookupPrefix
isDefaultNamespace
lookupNamespaceURI
addEventListener
removeEventListener
isSameNode
isEqualNode
compareDocumentPosition
contains
dispatchEvent
Can you help me?
@Edit I found this for javascript: Trigger a button click from a non-button element But i can't use it in my app.