Hi,
I'm working with the WebKitBrowser in C# (Visual Studio 2010) and I want to automatically create a user in the web application of owncloud.
The login form is displayed in
Picture 1. By clicking "Gruppen" a dropdown field with checkboxes appears (
Picture 2). The html-code is below:
<form id="newuser" autocomplete="off">
<input id="newusername" type="text" placeholder="Loginname" />
<input type="password" id="newuserpassword" placeholder="Passwort" />
<select class="groupsselect" id="newusergroups" data-placeholder="groups" title="Gruppen" multiple="multiple">
<option value="Benutzer">Benutzer</option>
<option value="admin">admin</option>
</select>
<input type="submit" value="Anlegen" />
</form>
I'm
able to fill the
newusername and
newuserpassword textboxes and
submit the form, for example:
String javascript = "document.getElementById('newusername').value = '" + newusername + "';";
WebKitBrowser1.StringByEvaluatingJavaScriptFromString(javascript);
But I'm
not able to select a value in
newusergroups (Picture 2), for example:
String javascript = "document.getElementById('newusergroups').options[1].selected = true;";
String javascript = "document.getElementById('newusergroups').value = 'admin';";
Maybe someone can help me? Thanks in advance and best regards,
Oli