I am using WATIN 2.1 with C#. Here is my Code
// Should I add something here like []
private void ProcessInkPresenter()
{
String path = "http://localhost/index.asp?HOSTID=AD&USERID=&ALIAS=" + userName;
Int32 startingRow = 1;
using (var browser = new IE(path))
{
browser.AutoClose = true;
try
{
try
{
browser.Image(Find.ByAlt("Use a password")).Click();
browser.WaitForComplete(90);
browser.TextField(Find.ByName("_MYPW")).TypeText(privateCurrentPassword);
// the application keeps crashing in the line above
// WatiN.Core.Exceptions.RunScriptException : RunScript failed
// ----> System.UnauthorizedAccessException : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
browser.Image(Find.ByAlt("Verify password")).Click();
browser.Link(Find.ByTitle("Change passwords")).Click();
browser.TextField(Find.ByName("_NEWP1")).TypeText(privateNewPassword);
browser.TextField(Find.ByName("_NEWP2")).TypeText(privateNewPassword);
browser.Image(Find.ByName("SUBMIT-CHANGE")).Click();
I basically need to get this to work with Internet Explorer 7 and up on Windows XP.
Can you please help me with this?
I added the CRASH details in the code above
Thanks
Is the field found?
I had a similar issue trying to get an HTML5 input type email.
It could also be other reasons watin can’t get to the field.