How to make testing script click or select tree menu expand icon on selenium ide? - selenium-ide

I have a question on selenium ide testing. How should I click or select on tree menu expand icon? When an icon hasn't any id or text, only class. <div class="GridxTreeExpandoIcon"> and it also has a shortcut control + right arrow. How to can I click control and right arrow with this script?

you can use the class as a locator to target the click, it would just be:
class=GridxTreeExpandoIcon
Or if you needed to be more specific and reference the div (if the same class is used for multiple elements:
css=div[class="GridxTreeExpandoIcon"]
This second version can be used for any attribute within a tag (e.g. title, value etc.)

Related

Where is the Variables Menu gone in the new Dymola UI?

Until Dymola 2020, now and then I used the Edit->Variables menu to set annotations. Where do I find it in the new UI in 2020x?
Edit->Variables:
I think the dialog you are referring to is available using one of two ways:
via the context menu, after a right-click. Within the "Variables" menu you will need to select the variable you want to edit from the list shown there.
If you select a variable before doing the right-click, it will be highlighted and moved to the top of the list of available variables as shown in the above screenshot.
Additionally it should be possible to access the dialog by highlighting the variable and pressing CTRL+Shift+N, but that does not work reliably for me...
Using the component browser (after enabling the "Include non-graphical" option, which is marked red) by right-clicking the variable you want to edit and then select "Variable..."
You can also find it in the GUI in the Text tab - well hidden inside the Insert button:

Create a GUI using WindowBuilder's visual designer

My question's really that simple. So simple that no one bothered to put the answer anywhere! I've tried googling 'open WindowBuilderPro' but 5-10 mins searching through links I'm no closer to an answer.
In Eclipse's Package Explorer pane, right-click on the package that you want your new GUI class to be in (create a new package first if it doesn't exist).
Select New/Other... from the pop-up menu.
Under "WindowBuilder", expand "Swing Designer".
Select "JFrame".
Click "Next".
In the subsequent dialog window, be sure that the package name is correct and type in the desired class name for your new GUI frame. Use a clearly descriptive name that tells the reader what this frame is for and that it is a frame, e.g. "MainAppFrame".
The "Use Advanced Template" checkbox should be checked.
Click "Finish"
Now click on the Design tab (at the BOTTOM of the editor!) credit to duDE for that bit.

does eclipse have a feature whereby I can find all instances of a specific label?

I know I can just grep it, but I was wondering if Eclipse has a built in feature where I can highlight a public class member and get a list of all the places where it is being used in the package.
TIA
Yep, right click on the member (I usually left click first and wait for Eclipse to highlight the member to make sure it knows what I want to search for) and choose Open Call Hierarchy for methods or References > Workspace for fields.
Highlight the class member and press ctrl + shift + g to find references in the workspace
Click Group by Package in the toolbar:
Click the View Menu arrow icon in the toolbar and select Show as Tree in the popup menu
Locate the desired package in the treeview and expand it to see results
I don't use Eclipse for Java, but in CDT, you can right click and select References->Project to do this.

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.

How to Display Current Function in Eclipse

I miss a certain functionality in Eclipse. I would like to know the name of the current function the cursor is currently inside. This is useful when browsing unknown code using the search function, for example.
Any idea how to show it? Maybe a plugin?
I'm using the "Toggle Breadcrumb" option from toolbar:
It shows a nice breadcrumb, ending with current function name.
It's quite handy for me, as Outline becomes cumbersome to use if you have zilions of functions.
It produces the following structure above your Java Editor (truncated at the picture below):
The "Outline" view shows the current function.
It may be necessary to enable the 'Link to Editor' option in the Outline View dropdown menu. This might be off by default for CDT.
I was looking for something similar (Xcode-like bar at the top showing the current function, where you can also go to another function by clicking on it to open a popup list of functions). Here is what I settled on with Eclipse 3.5.1 CDT:
I moved the Outline view to the top, resized it to make it a 1-line horizontal strip (don't make it too narrow), and selected "Link With Editor" in its menu, so that it always shows the current function. However, this doesn't open a popup list like Xcode. For that functionality, I assigned a shortcut to the "Show Outline" command which does open a popup list of all functions.
The Eclipse function 'show outline' will pop up a list of outline objects, and it will highlight the object your cursor is inside in grey. It's typically bound to 'ctrl-o' (the letter 'o', not zero), but you can re-bind it as you see fit. I'm running Eclipse with the CDT plugin and it works pretty well for me.
To enable the breadcrumb invoke Toggle Java Editor Breadcrumb in the toolbar or press Alt+Shift+B in the Java editor.
You can also display the Quick Outline (ctrl+o). This way you see the context quickly without having to have a permanent Outline Window linked to the Editor.
Use the "Link With Editor" option on the outline menu
Press Ctrl+o (cursor is currently inside a function at a particular line).
It highlights the current method, or name of the class if the cursor is outside the method body.
You can click on highlighted method.
It has got inline search feature ...start typing name of the method to navigate to the specified method or method with matching search pattern.
If you press again Ctrl+o to shows the inherited members/methods.
Using outline with "link with editor" option worked also for me, thanks!
Just an addition, you can move outline pane in to the same window group as search, progress etc. saves the space in your perspective instead of keeping it at another group.