How to 'Right click' or 'Context click' on an element in Karate UI - ui-automation

I have a situation where I have to right click on an element in Karate framework. I discovered that there is no direct facility to do so.
Is there any other way of doing that without the help of Keyboard keys?

Related

Adding\attaching gaols to media items programatically

For one of our requirements, we need to attach goals to few types of media items.
Going though each item in media library and adding 'gaols' through 'Analyze' tab will be tedious as there are hundreds of items. Is there any way to do it through script or code?
For getting the goals\events attached, we can check in "_Tracking" field. But Im not getting the exact syntax to update this field.
Any hints?
You can also achieve this without coding or PowerShell, using the search functionality within Sitecore. First go to the Media Library, then find the specific folder you're interested in.
With the folder selected you can then click on the little magnifying glass icon (next to the tabs Folder and Content). That will open a new tab where you can build a search query.
After building that and getting your results back, you can click the little down arrow next to the search query, and click the 'Search Operations'. Select the 'Apply campaigns events', which will open an 'Attributes' pop-up.
Go to the second tab called 'Events', and select your goals.

Is there a way to search/filter properties in Styles pane of Google Devtools?

On the Elements tab 'Find' functionality (cmd+F/ctrl+F) doesn't search through styles pane. Is there a way to type CSS property with HTML element selected and find it quickly in the Styles panel?
Bottom right corner, light gray text says "Find in styles". Click there and enter your search.
Unfortunately, such functionality does not exist in current Chrome Dev Tools.
But its present in Opera Dragonfly and its very handy, so, probably Chrome will copy it, eventually (but no such feature request exists in bug tracker now).
On the latest Chrome on Mac, I'm getting the filter at the top of the styles pane. I can't believe that I never noticed it given that I've needed it so many times!
Try using CTRL+Shif+F on the Elements tab

Eclipse Back/Forward navigation using mouse buttons

There is an addin for Visual Studio called MouseNavi that allows you to use mouse thumb buttons to navigate your history.
Does a similar extension exist for Eclipse?
I don't know of any Eclipse plugin that does this, but assuming you're using Windows:
This one should enable you to do what you want: http://www.highrez.co.uk/downloads/XMouseButtonControl.htm
With that tool you can assign each mouse button a sequence of keys (Alt+Left for example) and because it can be made application specific it won't interfere with other programs where you don't want that mapping.
Alt+Left and Alt+Right to navigate through the latest opened editors.
Also, Alt+L to open up the shortcuts popup, so you can see what's available.
No real mouse navigation control though (not that I know of... at least). Although, should not be very difficult to create one and attach it to the same handlers that deal with the navigation commands.
^Q takes you to last edited location. You can cycle using it. No mouse bindings.

Is it possible to hide/remove arbitrary context menu items in Eclipse (3.6)

My question can be split into three:
Is it possible to hide/remove arbitrary context menu items in Eclipse (3.6) by ...
standard UI?
some existing plug-in?
custom plug-in?
I failed to find ways to do this by methods 1 and 2. If the only option is creating custom plug-in, could anyone push me towards the right direction where to start (I have some experience in Java, but not in Eclipse plug-ins).
You can hide menus or menu entries through the standard GUI: see help
To hide a menu item or toolbar button:
Switch to the perspective that you want to configure.
Select Window > Customize Perspective....
Open the Menu Visibility or Tool Bar Visibility tab.
Find the item you want to hide.
Uncheck the check box next to the item. Uncheck a menu to hide all its children.
Click OK to cause the changes to take effect.
But that will hide this entry from all the menus (contextual or not) in which it is present.
So it may not be as fine-grained as you want through the GUI.
You can also try it through a plugin (see also Menu contribution)
The first steps are pretty standard for using extensions in Eclipse.
Open the plugin.xml file and add the org.eclipse.ui.activities extension.
Then create an activity node and give it a unique ID.
Then create an activityPatternBinding node and use the unique ID for the activity to find the pattern node to the activity node.
The activityPatternBinding node requires that you supply a regular expression for the ID string of the UI element that you wish to hide.
The problem is that there appears to be at least 3 ways that menu items and toolbar buttons are added to the UI.
The first way is through the newer Command/Menu Extensions.
The second way is through the older ActionSets Extension.
Then there are other UI elements that appear to be hard coded into the Workbench and do not have ID strings and cannot be hidden using the Activities Extension. Luckily there are few of this third type of UI element.
Considering you are talking about the latest Eclipse, I will copy only the first way:
1/ Use the Plug-In Spy
The first way is to use the Plug-In Spy.
Press alt-shift-F2 and click on a menu item or toolbar button that you want to be hidden.
If there is an ID string under the heading "active action definition identifier" then you are in luck.
This item has been added using the Command Extension and you can use this ID as the pattern argument for the Activities Extension.
But not all items that have been added using the Command Extension present their ID string to the plug-in spy.
As a side note, the ID strings are period separated.
For instance the ID for a button might be "org.eclipse.ui.navigate.backwardHistory".
Regular expressions use the period to stand for any character. Luckily the period used as a wild card matches with actual period characters so you don't need to escape them if you don't want to. I find it makes it a bit easier to read if they are not escaped and it is highly unlikely it will cause any ambiguous matches.

Faster way (keyboard shortcuts?) to use quick fixes in Eclipse?

I often use the Eclipse feature (Galileo) of suggested error corrections to automatically create code stubs or to refactor things. For example, I would write a method that calls other methods which don't exist yet, then move the mouse over the error message and click on "create method". Or, change this to the class name and choose "add static modifier" from the quick fixes.
I think this is very convenient because it lets me stay in one place in my code and sort of "remotely" wire up what's not currently visible on my screen. What I think is annoying though, is that I have to leave the keyboard, hover my mouse over the error symbol, wait for the tooltip to pop up, and click on the option (doing that, I sometimes move the mouse a little over the edge and the tooltip goes away again - very annoying).
Am I missing a faster method here? I can't seem to find a keyboard shortcut, but then I have overlooked stuff from the huge preference dialog before.
Ctrl+1 : Quick Fix.
(Cmd+1 on Mac)
Just put your cursor on the part you suspect you can perform an action (correction, refactoring, ...) and hit the Quick Fix shortcut. The same popup will be displayed, and you can select the right option with the up and down keys.
That, combined with Ctrl+3 (Quick Access) gives you most of eclipse features at your fingertips ;)
See also:
Eclipse Tip: Shortcut to Quick Fix
My Favorite Eclipse Shortcut: Quick Fix
Eclipse hotkeys: eclipse shortcuts gold mine.
As an additional tip, a specific type of quick fix I use all the time has a dedicated shortcut:
Alt+Shift+J: Add Javadoc comment stub for current method.
After using ctrl+1 like mentioned in the top answer, press ctrl + enter to apply the selected fix all to problems of the same category.
In general, keyboard shortcuts in IDEs (and code tools in general) are coming from a user principle that holds that the more your hands/fingers can remain poised over the keyboard (as in the f-j centered "touch typist" position), the more productive you can become. This is probably why the use of the number keypad is not encouraged, or other keys, less common to the most basic layout keyboard, are not used. Many hold that useful keyboard shortcuts should be easily reachable from this position.
One thing I will say about eclipse keyboard shortcuts is that if you use a popular Windows presentation utility called Zoom-it, you need to turn that off when using eclipse. There are several show-stopper conflicts between the two, such as Ctrl-1 and Ctrl-3.