Page 1 of 1

Press 'End' key during WebDriver execution

Posted: Fri Mar 22, 2019 8:13 pm
by BrotherCarson
Zips up flame suit. There is a chance this has already been answered but I was unable to find it.

I have been attempting to press the 'End' key while running my scripts against a WD endpoint and have thus far been unsuccessful.

I have a bunch of text boxes that need to scroll to the bottom before the buttons will activate and when executing locally I am able to satisfy this need via the 'End' key.

I have tried all of the following with no luck:

repo.documentsPage.doc1_box.PressKeys("{RControlKey down}{End down}{RControlKey up}{End up}");

Error: The escape group {RControlKey down} is not supported by the web driver.

repo.documentsPage.doc1_box.PressKeys("{End}");

Error: The escape group {End} is not supported by the web driver.

Keyboard.PrepareFocus(repo.documentsPage.doc1_box);
Keyboard.Press(System.Windows.Forms.Keys.End, Keyboard.DefaultScanCode, Keyboard.DefaultKeyPressTime, 1, true);


Error: Cannot perform a local keyboard action on a mobile element.

I hope I am just over looking something simple, and I am using the wrong key words in my Google search but I have come up with nothing else to try here (regarding an 'End' key press).

So I ask the forum and it's infinite wisdom if they could assist me with this.

Thanks!

Re: Press 'End' key during WebDriver execution

Posted: Fri Mar 22, 2019 9:11 pm
by BrotherCarson
Ranorex version: 9.0.0
Local and remote OS: Win 7

Whoops forgot to post this.

Re: Press 'End' key during WebDriver execution

Posted: Mon Mar 25, 2019 1:36 pm
by Support Team
Hi BrotherCarson,

Thank you for your post.

Unfortunaltey, the excape groups for pressing the "End" key are not supported on a webdriver endpoint.
However, you can implement a workaround using Selenium code:
PressEndKey.png
Please let us know if this helps, or if you need assistance implementing this code.

Kind Regards,
Stephan

Re: Press 'End' key during WebDriver execution

Posted: Tue Mar 26, 2019 8:21 pm
by BrotherCarson
Support Team wrote:
Mon Mar 25, 2019 1:36 pm

Please let us know if this helps, or if you need assistance implementing this code.
Yep, worked like a charm! Thanks for the assist.

Re: Press 'End' key during WebDriver execution

Posted: Wed Mar 27, 2019 10:59 am
by Support Team
Hi,

That's great!
I'm glad I could help.

Regards,
Stephan