FlaUI icon indicating copy to clipboard operation
FlaUI copied to clipboard

Using Keyboard.pressing(VirtualKeyShort.ALT) not working

Open rahulkate-bit opened this issue 4 years ago • 4 comments

I am trying to do something like this on an application

using(Keyboard.Pressing(VirtuaalKeyShort.ALT))
{
     Keyboard.Type("y");
}

but it does not seem to be working.

But this seems working

using(Keyboard.Pressing(VirtuaalKeyShort.CONTROL))
 {
        Keyboard.Type("y");
}

Flaui 3.0.0 nuget package for c#

Update. It works with Notepad. But not working in a particular software that I am trying to automate.

Any help would be much appreciated. Thanks

rahulkate-bit avatar Mar 06 '20 18:03 rahulkate-bit

Can you try Keyboard.Type(VirtualKeyShort.KEY_Y)? Also try the key z in case there is some region settings problem.

Roemer avatar Mar 13 '20 07:03 Roemer

Figured out that for this app this works

Keyboard.Type(VirtuaalKeyShort.CONTROL);
Keyboard.Type(VirtuaalKeyShort.KEY_Y);

but this does not

using(Keyboard.Pressing(VirtuaalKeyShort.CONTROL))
{
     Keyboard.Type(VirtuaalKeyShort.KEY_Y);
}
or 
 Keyboard.TypeSimultaneously(VirtuaalKeyShort.CONTROL, VirtuaalKeyShort.KEY_Y);

Also now this application is not accepting Alt + P combination at a certain stage via flaui. Though if I type from my keyboard there it works like a charm,

Actually in this application it takes on full screen by default, also I can just get the parent window in inspect tool I don't get any child control in the inspect tool. Not even sure what this app is made from.

Any thoughts?

rahulkate-bit avatar Mar 16 '20 13:03 rahulkate-bit

Probably related to https://github.com/FlaUI/FlaUI/issues/295

Roemer avatar Apr 17 '20 11:04 Roemer

Is there any update or workaround for this issue? We had some partial success with using SendKeys instead, but this only worked when the tests ran locally in our Azure pipeline this did not work either.

Benjamin-Grimm avatar Aug 18 '23 08:08 Benjamin-Grimm