Hi Team,
I am trying chromeheadless now, most of the UI operations could work, but for keybord, which do not work, like below:
Manager.Current.Desktop.KeyBoard.KeyDown(Keys.Alt);
Manager.Current.Desktop.KeyBoard.KeyPress(Keys.End);
Manager.Current.Desktop.KeyBoard.KeyUp(Keys.Alt);
It's not always broken, when I use it in my case, the same code work for chrome, but broken for chromeheadless, i don't know how to debug the issue. Can you please help to check for us?
Message:
ExecuteCommand failed!
InError set by the client. Client Error:
Protocol error (Input.dispatchKeyEvent): Invalid 'text' parameter
BrowserCommand (Type:'Action',Info:'NotSet',Action:'RealKeyboardAction',Target:'null',Data:'keyDown#$TS$#LMenu',ClientId:'1748F9AF024B6615B325B7310DF45C36',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'Protocol error (Input.dispatchKeyEvent): Invalid 'text' parameter')
InnerException: none.
Stack Trace:
ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
InError set by the client. Client Error:
Protocol error (Input.dispatchKeyEvent): Invalid 'text' parameter
BrowserCommand (Type:'Action',Info:'NotSet',Action:'RealKeyboardAction',Target:'null',Data:'keyDown#$TS$#LMenu',ClientId:'1748F9AF024B6615B325B7310DF45C36',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'Protocol error (Input.dispatchKeyEvent): Invalid 'text' parameter')
InnerException: none.
Browser.ExecuteCommandInternal(BrowserCommand request)
Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
HeadlessKeyboard.PressOrReleaseKey(Keys key, Boolean release)
KeyBoard.KeyDown(Keys code, Boolean delay)
KeyBoard.KeyDown(Keys key)
<.ctor>b__26_8() line 106
Thanks,
Jun