PinElement = dialog.FindFirst(TreeScope.Descendants, new AndCondition(
= Code Snippet = AutomationElement dialog = FindActivClientPinDialog() Net 4.7.1: `Keyboard.SendKeys(plainTextPin, true) ` The below CodedUI code snippet worked in VS 2015. Modeled process based on commands offered in following MS site: īackground: Migrating CodedUI implementation to UI Automation since CodedUI is going away. Adjusted length of Thread.Sleep in hopes to slow things down enough without throwing an exception for Alert dialog displayģ.
Placed Thread.Sleep commands between SetFocus command and SetValue command -AND- between SetValue and Invoke of OK buttonĢ. What I've done to diagnose the issue so far without success:ġ. Refer to code snippet at bottom for details. HOWEVER, the UI Automation ValuePattern SetValue command sporadically sets the PIN value with something other than the supplied plain text PIN value! When it incorrectly sets the value, the process halts after the OK button is selected due to an invalid PIN entry attempt. Issue: The automation is successful in launching the browser, navigating to the URL, selecting the certificate from the Windows Security (Select a Certificate) dialog and correctly recognizes the 'ActiveClient Login' dialog and its PIN value field. Scenario: A script launches an IE 11 browser and navigates to an https website that authenticates access with a CAC/PIN.
Net 4.8 Unit Test solution/project using hybrid Selenium/UI Automation framework