Using AutoIt to click a button on a window - bots

Which function should I use in order to click a pop button after running a program? For example, the league of legends launcher button is what I want to simulate the click.

You can use either MouseClick if you know the coordinates of where to click:
MouseClick("left", x, y)
Or you can use ControlClick to click on a specific button:
ControlClick("Window title", "", "[classname provided by AutoitINFO]")

Related

Create Arrow Button in Qt Designer?

In Qt Designer I can only drag the ToolButton from Widget box. The generated code will look like this.
self.toolButton = QtWidgets.QToolButton(Frame)
self.toolButton.setGeometry(QtCore.QRect(350, 480, 26, 22))
self.toolButton.setObjectName("toolButton")
The button will look like this:
I want it to be an arrow button. For it to be an arrow button, I can do like this:
self.toolButton.setArrowType(QtCore.Qt.UpArrow)
My question is, how can I make the arrow button directly in QtDesigner without changing any code ?
Its in the settings for the tool button on the right hand side

Button on Popup form with few more user defined fields

When I cilck on a button on main toolbar, I am displaying a popup form (PXSmartPanel) with few fields on it. Whenever I click on the main toolbar button, I want first the control should go to the popup form and based on buttons on popup form (Ok/Cancel), it should perform the action.
However, I tried that but eventually when I click on button on main toolbar, it first executes the code behind for that button and then shows popup.
Any suggestions?
Found the solution. You can use AskExt method of your DAC class to show popup first and then execute your code.
You can also use px:PXSmartPanel with AskExt. With help of PXSmartPanel you can customize your screen, and even add some buttons to your pop up. Here I wrote "short" manual how to do it.

In Robotium, Click on QuickAction icons

Can any body tell that me how to click on the quick action icon [ buttons visible on screen with icon only- and without text labels ] in robotium. I need to automate some test cases, But i am not able automate that how to click on the quick action icon.
Thank You,
Manju
click on first Quick icon - solo.clickOnImageButton(0); OR solo.clickOnImage(0);
click on second Quick icon - solo.clickOnImageButton(1); OR solo.clickOnImage(1);
By "quick action icon" you mean a MenuItem in the ActionBar? You can click those in the overflow (and those shown withText) with solo.clickOnMenuItem("MenuItemTitle");
I am currently looking for a way to click those that have no visible title.

How to grayed out the button in Xpage

Please help me out in the below case:
When we clicked on the button in the current window (which has Cancel and OK button in the title bar). then it should display the small pop up with Two buttons. (Apply defaults and cancel button)
When we clicked on the Apply defaults in the small pop up, then the pop up should be closed and then display the previous window with disable(grayed out) the cancel button in the title bar.
Please let me know how to grayed out the cancel button
subbu,
Make your "Cancel" button in the title bar a dijit.form.Button. When the user clicks the "Apply defaults" button in the popup, you can then call a clientside script to disable it:
dijit.byId("#{id:yourCancelsButtonId}").setDisabled(true);
If you don't want to do it client side you should be able to accomplish the same thing server side like:
var buttonComp = getComponent("IdOfButtonToDisable");
buttonComp.setDisabled(true);
I'm not sure if you'll have to do a partial refresh to make it show up but that should work.

How create drop down menu, use LWUIT? What solutions exist?

I need to create drop down menu (see the picture). What methods are there? What should I use?
LWUIT 1.5 includes a popup dialog which does exactly that. It also has the ability to use an arrow border when specified. See the LWUITDemo's Dialog demo.
Create a class which derives Dialog , and add a List inside that Dialog. When you click the button then show the Dialog with the four params top, bottom, left and right.
To draw the triangle of the drop down menu just implement the paint method when you derive Dialog in which you call :
super.paint(g);
g.drawLine(x1,y1,x2,y2);
g.drawLine(x3,y3,x4,y4);

Resources