Ugh
I didn't quite get what you are asking, but here is a try.
The keyboard shortcuts are hard coded and can not be changed without a code change. But the desired shortcut may already exist, the list of available shortcuts is in the documentation [1]. Also reading the RIDE How To [2] contains lots of useful information.
-Tatu
Send from my mobile
[1] https://github.com/robotframework/RIDE/wiki/Keyboard-Shortcuts
[2] https://github.com/robotframework/RIDE/wiki/How-To
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.
I believe they are asking how they can use Robot Framework to send a CTRL+A key sequence to the application under test.
Phuoc, is this correct? If so, what does your application run in? A terminal? A web browser? A native app? Depending on how the application is implemented, you will need to use a different library to construct a keyword to send the CTRL+A.
I believe they are asking how they can use Robot Framework to send a CTRL+A key sequence to the application under test.
Phuoc, is this correct? If so, what does your application run in? A terminal? A web browser? A native app? Depending on how the application is implemented, you will need to use a different library to construct a keyword to send the CTRL+A.
On May 22, 2014 9:39 AM, "Tatu Aalto" <aalto...@gmail.com> wrote:
Ugh
I didn't quite get what you are asking, but here is a try.
The keyboard shortcuts are hard coded and can not be changed without a code change. But the desired shortcut may already exist, the list of available shortcuts is in the documentation [1]. Also reading the RIDE How To [2] contains lots of useful information.
-Tatu
Send from my mobile
[1] https://github.com/robotframework/RIDE/wiki/Keyboard-Shortcuts
[2] https://github.com/robotframework/RIDE/wiki/How-To
On 22 May 2014 15:09, "Phuoc Ha" <phuo...@gmail.com> wrote:
Hi guys,--
I'm using Robot IDE to create test case.
I would like to edit a textbox. I have to press key Ctrl + A and enter new value into that textbox.
Anybody know how to create keyword to press key Ctrl + A ?
Please help me.
Thanks all.
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
Try this:
key_down(self, locator, keySequence) | source code |
Simulates a user pressing a key (without releasing it yet).
'locator' is an element locator 'keySequence' is Either be a string("" followed by the numeric keycode of the key to be pressed, normally the ASCII value of that key), or a single character. For example: "w", " 9".
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
def press_keys(self, locator, keys): """Simulates user pressing one or more KEY(s) or SPECIAL KEY(s) simultaniuosly or in sequence on element identified by `locator` while HOLDING DOWN one or more MODIFICATION KEY(s). `KEY`: 0-9, aA-zZ, -+*/% etc. `SPECIAL KEY`: F1-F12, DEL, TAB, ARROW_UP/_DOWN/_LEFT/_RIGHT etc. `MODIFICATION KEY`: ALT, ALT_GR, CTRL, R_CTRL, SHIFT, ALT_SHIFT, ALT_GR_SHIFT etc. `KEY` is either a single character, (TODO: or a numerical ASCII code of the key lead by '\\\\'), or a sequence of single characters. `SPECIAL KEY` and `MODIFICATION KEY` are special key names defined at selenium.webdriver.common.keys. Examples: # locator # key sequence # usage example | Press Keys | <locator> | CONTROL + a | # select | Press Keys | <locator> | CONTROL + A | # select | Press Keys | <locator> | CONTROL + A | # select | Press Keys | <locator> | CONTROL + C | # copy | Press Keys | <locator> | CONTROL + V | # paste | Press Keys | <locator> | CONTROL + ABC | # custom | Press Keys | <locator> | CONTROL + SHIFT + A | # e.g. opens Firefox's Add-ons-Manager | Press Keys | <locator> | CONTROL + ALT + DELETE | # e.g. shows lock screen on Windows | Press Keys | <locator> | CTRL + ARROW_UP | # and so on """ keys = keys.split(' + ') i = 0 named_keys = [] named_key_sequence = [] for key in keys: try: named_key = getattr(Keys, keys[i]) print "%s. named key is %s." % (i + 1, key) named_keys.append(keys[i]) i = i + 1 except: print "The rest '%s' is unnamed." % key unnamed = str(key).lower() i = i + 1 print "NAMED KEY(s):", named_keys for key in named_keys: named_key_sequence.append('Keys.%s' % key) named_key_seq_as_string = ','.join(named_key_sequence) print "NAMED KEY SEQUENCE:", named_key_sequence print "NAMED KEY SEQUENCE as STRING:", named_key_seq_as_string print "element.send_keys() call should look like this:" print "element.send_keys(%s, '%s')" % (named_key_seq_as_string, unnamed) #select it element = self._element_find(locator, True, True) # execute 'press_keys' action exec("element.send_keys(%s, '%s')" % (named_key_seq_as_string, unnamed))
Library ImageHorizonLibrary
*** Test Cases ***
Try Press Ctrl + T With ImageHorizonLibrary
Press combination Key.ctrl tAs per Phuoc Ha