Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clearing input fields and sending modifier keys such as Ctrl key #155

Closed
kensoh opened this issue May 9, 2018 · 7 comments
Closed

Clearing input fields and sending modifier keys such as Ctrl key #155

kensoh opened this issue May 9, 2018 · 7 comments
Labels

Comments

@kensoh
Copy link
Member

kensoh commented May 9, 2018

Raising on behalf of user's email so that other users can benefit -


Have started using TagUi and fascinated with it.

I have a input field which has default test already in it, which needs to be deleted before entering any text.

Manually this can be achieved using [ctrl+A] and [delete] keyboard combination. How can this be achieved in TagUI file?.

In short, how do i send modifier keystrokes to the input field?.

Thanks in advance,

@kensoh kensoh added the query label May 9, 2018
@kensoh
Copy link
Member Author

kensoh commented May 9, 2018

Hi @dinesh3434, short answer is use the [clear] keyword, for example -
type email_text_box as [clear]test@gmail.com

Long answer, need to check as I have not tested modifier keys on Chrome. Sikuli integration using vision step should be able to send modifier keys as well but will need to test before sharing with you.

@kensoh
Copy link
Member Author

kensoh commented May 12, 2018

I tried Chrome DevTools Protocol's Input.dispatchKeyEvent but result was not able to simulate the key entry with modifier keys. If you want to do more than the [clear] keyword above, you can try using the visual automation with Sikuli, which you can send custom keypresses using TagUI vision step. Will need to visually click the field first before doing the custom steps. More modifier keys definitions here.

macOS

vision type('a',Key.CMD)
vision type(Key.DELETE)

Windows

vision type('a',Key.CTRL)
vision type(Key.DELETE)

@kensoh kensoh closed this as completed May 12, 2018
@kensoh
Copy link
Member Author

kensoh commented May 16, 2018

response from user

   Thanks for your input, but i am using headless chrome for my automation in windows 10 environment. According to the documentation sikuli will not help me in this situation (correct me if i am wrong). Please let me know how we can use modifier keys in this situation.

Also, let me know how we can use sikuli if it is possible to do so (I cannot use Xvfb or tigerVNC)


my response

I'm afraid Sikuli won't work without a screen or running in headless mode. It seems that Chrome technically can work with modifiers but haven't figure out a way for TagUI to do that. Can you tell me more about your use scenarios for modifier keys?

@kensoh
Copy link
Member Author

kensoh commented May 17, 2018

user response

The scenario is to manipulate online excel like sheets. Shift + arrow keys are used to select the data and manipulate the same. Hence, Modifier keys are required for the same.

@kensoh
Copy link
Member Author

kensoh commented May 17, 2018

Reopening issue to explore further on modifier keys -

Ic.. Thanks @dinesh3434 for sharing.. I'm reopening the issue to explore further. For your online excel sheet application, is it open for public, or it is similar to Google sheets that I can try testing on?


Thanks :). It is similar to google sheets and you can try testing on the same.

@kensoh kensoh reopened this May 17, 2018
@kensoh
Copy link
Member Author

kensoh commented Jun 14, 2018

@dinesh3434 to prioritize on the other features, closing the issue as not supported for the use case of sending custom keystrokes in invisible mode (eg running without display adapter screen, no Xvbf on VM etc). during visible mode, users can use vision step to send custom commands to sikuli, for eg

click terminal_icon.png
vision type("ls -lrt" + Key.ENTER)

List of key modifiers, special keys, and examples - http://doc.sikuli.org/keys.html

update
In currrent cutting edge release, for entering simple text (characters, enter key),
type page.png as text can now be used. more details here - #113 (comment)

@kensoh kensoh closed this as completed Jun 14, 2018
@kensoh
Copy link
Member Author

kensoh commented Jun 14, 2018

fyi @Aussiroth @lohvht

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant