Exception on set text and button is not click
See original GitHub issueHello,
I’m can’t to use FlaUi, need help please.
First, I try set a text to a TextBox and showme a “System.InvalidOperationException”.
var pass = window.FindFirstDescendant(cf => cf.ByName("ds_pass"))?.AsTextBox();
pass.Text = "SUPER";
Second, I try click a button, but not happens:
window.FindFirstDescendant(cf => cf.ByName("OK"))?.AsButton().Click();
Thanks!!
Issue Analytics
- State:
- Created 6 years ago
- Comments:11 (5 by maintainers)
Top Results From Across the Web
Exception on set text and button is not click · Issue #116
First, I try set a text to a TextBox and showme a "System.InvalidOperationException". var pass = window.FindFirstDescendant(cf => cf.ByName(" ...
Read more >Click all buttons and skip one when I get error exception ...
The problem is that not all buttons set are clicked since I get the exception. Basically if I set 20 clicks with limit,...
Read more >Button | Android Developers
To specify an action when the button is pressed, set a click listener on the button ... Indicates that the content of a...
Read more >The Shelly Cashman Series Microsoft Office 365 & Word 2021 ...
To set an exception to an AutoCorrect rule, click Options in Backstage view, ... type the exception entry in the text box, click...
Read more >Microsoft Publisher 2019 Training Manual Classroom in a Book
Then, click “Find Next” to find the text you entered. You can then click the “Replace” button to replace the selected instance. Repeat...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
What kind of control is your textbox (WPF, WinForms, some library control)? As alternative, you could try using
Enter
instead of.Text
.This question is searchable by Google and I come across it while working on my problem, hope it helps others. I have WPF app, there’s a textbox and button bound to a command. When you enter something into textbox, the button become enable. But, I had a flaky test related to it. It worked fine on local machine, but on CI I got timeout error while waiting for the button to enable:
System.TimeoutException : Timeout occurred in retry Stack Trace: at FlaUI.Core.Tools.Retry.While[T](Func
1 retryMethod, Func
2 checkMethod, Nullable1 timeout, Nullable
1 interval, Boolean throwOnTimeout, Boolean ignoreException, String timeoutMessage, Boolean lastValueOnTimeout, T defaultOnTimeout) at FlaUI.Core.Tools.Retry.WhileFalse(Func1 checkMethod, Nullable
1 timeout, Nullable1 interval, Boolean throwOnTimeout, Boolean ignoreException, String timeoutMessage) at FlaUI.Core.AutomationElements.AutomationElementExtensions.WaitUntilEnabled[T](T self, Nullable
1 timeout)I used textBox.Text to set the value, and apparently it didn’t produce needed events. textBox.Enter() solved the problem, thank you Roemer!