Can someone explain how to perform a keyboard based copy and paste (e.g. CTRL-C, CTRL-V) in an Intern functional test please?
I've navigated to the element using .keys() with the wd.special-keys module but I'm not sure how to actually get a combination key press to work... I've reviewed the documentation at http://www.w3.org/TR/webdriver/ and the API at https://github.com/admc/wd/blob/master/doc/api.md but I've been unable to get anything to work.
I've tried using both .keys and .type and tried ending with NULL as I've seen in some WebDriver examples.
For example, should this be expected to work (when an element has focus and text is highlighted)...
.type([specialKeys["Control"],"c"])
Any help would be greatly appreciated, thanks.
.type([wd.SPECIAL_KEYS.Control,"c"])
https://github.com/admc/wd/search?q=special_keys
Related
Does anyone know how to let the autofill thing come out whenever I want?
It is really frustrating that I have to retype my code so that the autofill thing will automatically come out, currently that is my way of doing it
I found it by myself. It is control + space and the Basic code completion will come out.
Also can use Control+Shift+Space and Smart code completion (filters the list of methods and variables by expected type) will come out
Check out other shortcut here!
I create mathematics workbooks in Microsoft Word. Typing in each equation is slow but faster than LaTex. So, I often copy content from a website like LibreTexts. If I copy a section that contains equations it comes out garbled. So, I go to each equation, right click, hover over Show Math As, select MathML code, select all (Ctrl+a), copy (ctrl+c), close window (Ctrl+w), go to word (Alt-Tab), paste as plain text (Ctrl+Shift+v), go back to Chrome browser (Alt-Tab), then repeat the process.
This can be faster than typing by hand, but there has to be an easier way. There was a post similar to this one, but I don't know what extension was referred to and I don't know java.
If your solutions contains the step "learn basic Java here", that is fine. If this is the incorrect Stack Exchange, please suggest the correct one.
Thank you.
Okay, I am not sure if this question belongs here.
Either way, I am interested to know how to show one source on Developer ➛ Page Source (Firefox) and totally another when CTRL+A on the page ➛ Inspect Element. I have seen it is done on some of the sites I have visited, for instance: http://www.therigsofficial.com/
Thank you. I truly appreciate all help.
It is impossible to hide your javascript completley, but you can make it harder to read by obfuscating.
Try this tool JavaScript Obfuscator. Pro. It can work on your case.
Hello and thank you in advance,
I am wondering if there is a way to change the layout of my keyboard (software-wise).
The problem is that, on my laptop's keyboard, the Page Up and Page Down keys are combined with the Home and End keys respectively (i.e. to use Home, I have to use the command fn+PgUp/Home).
Is there a way for me to switch what my keyboard receives in Windows 8? If I press the PgUp/Home key I would like the Home command to be entered, and if I entered fn+PgUp/Home I would like the PgUp command to be entered.
I have tried googling for this using several different keywords, but haven't been able to find anything.
Any help is appreciated,
Zach
This is a duplicate question.
You can find an answer here:
https://superuser.com/questions/694465/remapping-a-keyboard-key-in-windows-8-1
Keep in mind this does require registry edits which can be dangerous and can lead to critical failures if not done correctly. Always create a restore point before making any registry edits.
I have prepared web testing script on Mac OSX with watir-webdriver. It was running fine with Firefox. However, then I ran the script on Windows with Firefox and the text entry is slow, like typing each word individually. I have read couple of threads in regards to this problem, but never came to the solution. Maybe someone could shed some light on this.
Please also kindly note that I use browser.element(:xpath).set "text" to locate the elements to set the text.
Thank you very much in advance.
The issue has been resolved using Clipboard gem. Instead of using .set or .value methods, I started using Clipboard copy / paste, which worked perfectly. I still do not consider this as best solution, but it can get the job done.