Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Vermaat.Crm.Specflow/EasyRepro/TemporaryFixes.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ public static BrowserCommandResult<bool> SetValueFix(this WebClient client, stri
// date only fields don't have a time control
// clearing the date part of a datetime field is enough to clear both
if (dateOnly || !value.HasValue)
{
driver.ClearFocus();
return true;
}

// Time field becomes visible after focus is lost.
// Clearfocus will have unwanted side effects like popups or redirects for some reason.
Expand Down Expand Up @@ -99,7 +102,6 @@ private static void ClearFieldValue(IWebElement field, InteractiveBrowser browse
if (field.GetAttribute("value").Length > 0)
{
field.SendKeys(Keys.Control + "a");
field.SendKeys(Keys.Backspace);
}
browser.ThinkTime(2000);
}
Expand Down