I have to simulate button press in my script.
I have a big application running in which I have to put some values in some fields and press enter so proceed to next panel and so on.
I got idea about simulating ENTER using echo "\n", but unable to find out how to simulate buttons like Function keys, arrow keys and pressing alphanumeric characters.
Any idea will be helpful
You can use expect to do this.
In NSIS, on a custom page, I want to skip the page when the user presses the Cancel button, but I want to exit the installer (with confirmation) when the user presses the window's X button. How do I do that?
Currently, by using Modern UI and custom abort function, I get the same function called regardless of which of the two buttons is pressed.
This is not normal installer behavior and I would not recommend that you try to implement this.
If you still want to try I guess it might be possible with the ButtonEvent plug-in or the WndSubclass plug-in...
I'm new to Calabash-iOS automated testing, but need to get automation in place quickly. The app I'm working on has a pop-up cancel/confirm message when logging out. I've tried every way I can find to click the confirm button in the pop-up but I can't seem to get it to work.
If at all possible, try to give me an answer using the Calabash pre-defined steps as I'm not at the point of creating custom steps yet.
The Calabash iOS Smoke Test app has examples of touching alerts: alerts.feature.
Then I touch the "Confirm" button
This is a predefined step that is trying to touch a button. Starting in iOS 7(?), the "Confirm" view in the alert is not a button, but a UITableViewCell.
Then I touch "Confirm"
This tries to touch the first view marked "Confirm".
Since I do not know what you have tried before, and also because you don't want to know how to define your own methods/steps, Calabash for iOS does have a pre-defined step to do this. Try this Then I touch the "Confirm" button.
Apparently, Then I touch "Confirm" was all that was needed. Which is weird cause I could have sworn I tried that. For some reason it was not being interpreted as a button.
I have an editor input for adding resume.When user click edit button the editor is loaded via ajax.Here is the code for loading editor:-
jQuery('#resumeEditor').wysihtml5();
When the user clicks the cancel button and again tries to edit the resume, multiple editor toolbar appears.
I think I have to delete all instance of editor.But I dont know how!
Any help appreciated.....
This worked for me. Try it out:
$('.wysihtml5-sandbox, .wysihtml5-toolbar').remove();
$('#resumeEditor').show();
It removes the wysihtml5 and shows the textarea as it was before initializing.
I had à similar problem and resolved with this code
$("textarea").next().next().remove();
$("textarea").prev().remove();
$("textarea").css('display', 'block');
removing the HTML tags by hand, I tried to find some kind of function to remove and have not had succeed
Because I like to make common actions quick to access, I'd like to define a hotkey, e.g. Alt+L to do "reply to all with history", to act on the selected email. I'm using Lotus Notes 8.5 under Windows. Currently I have to either click the Reply button and then click "Reply to All with History Only" or I have to press Alt+3 then cursor down several times and press enter. Actually, Alt+3 doesn't always work because if the email is opened in its own window then you have to use Alt+2.
I've pursued several solutions:
o I've looked for consistent hotkeys within Lotus Notes, but no luck. The shortcut key support in Lotus Notes is not very good, and you can't define custom shortcut keys.
o I've tried using AutoHotkey to send keystrokes to Lotus. You can do a reply by typing Alt+A to get to the Actions menu. Unfortunately, the accelerator keys underneath the Actions menu change whether you are in the email list or if the email is in its own window. Also, the Actions menu doesn't always drop down quickly, so timing the sent keystrokes is problematic.
o I've tried writing LotusScript Agents to do a reply all. I've learned there is a Shared Action named "Reply to All\Reply to All with History Only". I don't think there is a way to have an Agent call an existing Shared Action, so I guess I can just clone the Shared Action code into my Agent. That still leaves the problem of invoking the Agent via a hotkey.
o I haven't tried it yet, but I think the solution will be to create an Agent that can perform a reply all. Create a VBS script to use the Lotus Notes OLE/COM interface to invoke the agent then have AutoHotkey call the VBS file when a hotkey is pressed. FYI: AutoHotkey doesn't support COM directly. However AutoIt and I believe AutoHotkey_L do support both COM and hotkeys so I could use one of those languages.
I'm open to any suggestions, but I want a solution that is reliable. As mentioned, my current AutoHotkey solution fails sometimes because the Lotus GUI is not a very standard Windows GUI. As I understand it, the Lotus GUI is a Java/Eclipse application. I believe Lotus supports Eclipse plugins, so maybe that is an option.
I started with:
#IfWinActive Mail - Inbox - IBM Lotus Notes
!l:: Send {Alt}ayr
!r:: Send {Alt}ape
return
But have also included:
#IfWinActive ahk_class SWT_Window0
!l:: Send {Alt}ayr
!r:: Send {Alt}ape
!1::
!S:: Send !1
return
The above is to facilitate usage of the shortcuts even in mails with its own window... where the title text is diff. Hope it helps!
Here are the AutoHotkey shortcuts that I created, which are similar to those mentioned above. I used the hotkeys that I remember from outlook as a basis for them:
IfWinActive, IBM Lotus Notes
{
#IfWinActive New Message
{
^Enter::
SendInput, !1
return
}
#IfWinActive, Inbox
{
^r::
SendInput, !C+E
return
^+r::
SendInput, !A+Y+R
return
}
}
I'm using Notes 8.5, btw.
You might be able to make your life easier with a custom smarticon (toolbar button). I don't have 8.5 to test this on, but it works on Notes 6.
Go into the design view of the mail database, and open up the memo form. Then look for the action button you are trying to duplicate. Copy all the formula code (probably just a few lines). Then create a new toolbar button by right-clicking on a toolbar and choosing Toolbar properties. Paste the formula into the button and save.
This still doesn't get you the shortcut key trigger you're looking for, but perhaps in 8.5 you can assign a hotkey to a toolbar icon? If not, you could create an AutoHotKey script, triggered by a hotkey you choose, that simulates clicking the smarticon button using references relative to the current window. I think it would be consistent provided the toolbar is always in the same place.
Using the helpful "Alt a-y-r" approach above, I just wrote a tiny little AutoHotkey script to map alt+r and alt+l to the common usages:
#IfWinActive Mail - Inbox - IBM Lotus Notes
!l:: Send {Alt}ayr
!r:: Send {Alt}ape
return
Basic, but it works for 90% of my uses. I'm going to create hotkeys for everything using this method.
The obvious way is to press "ALT-A-Y-R" (reply to all with history) or "ALT-A-Y-E" (reply to all with history + attachments).
Pressing ALT-A will show you the hotkeys for each menu option on the Action menu. Might be different character if you are not using the English version.
I found myself here adapting from Outlook's Ctrl+R and Ctrl+Shift+R to reply or reply to all and looking for a way to reply to an email with a sensible number of key presses.
I found that by clicking File > Preferences, there is an option called:
Enable alternate keyboard shortcuts (for example Ctrl+R=Reply)
That solved most of my issue. Using Notes 9.