Unable to find button of dialog in coded ui test - automation

i have ok button on my dialog box and on the top of dialog new dialog is opening which having again ok button while recording it identify the button but when i run coded ui test then it will not identify second ok button and not clicking on it because of it my test get fail...i am using visual studio 12 ultimate.... please help
Thanks in Advance

Use uielements wait methods WaitForControlExist, WaitForControlEnabled and WaitForControlReady before you click when dealing with popups, or any button. It's likely that your tests are trying to click before the popup "ok" button is ready.
uiControl.WaitForControlExist(20000);
uiControl.WaitForControlEnabled(20000);
uiControl.WaitForControlReady(20000);
mouse.click(uiControl);

Related

'true' is being shown when SWT Radio Button is clicked while UFT automation testing

We have a dialog, where we use table viewer and in one of the columns, we used a Boolean data which are shown in the form of radio buttons. While running an UFT based automation suite which clicks the radio button and also encounters a confirmation dialog and clicks some other radio button again. In that above process we encounter the issue which is not possible to encounter while testing manually.
I would like to know what the issue might be.
Let me know if there is a way to fix it.

Radio button in Uipath

How to select one radio button always from 4 options in Uipath studio automatically. I have tried click on activity and check button but every time it only open site and not responding and sometimes this activity doesn't work in your selected activity message pop's up and in selector validate button appears in red colour please help me to solve this issue.

Clicking a button via IE automation VBA

I have problem clicking the button from VBA using IE.
The page is
http://trademap.org/Country_SelProduct_TS.aspx?nvpm=1|||||TOTAL|||2|1|1|1|2|1|2|1|1
All button I can click, and works fine except Previous/Next period
The control ID is ctl00_PageContent_GridViewPanelControl_ImageButton_Previous
I tried several different methods but nothing worked.
Any help appreciate
Thanks
Is a Javascript controlled button. You will need to use div.FireEvent "onclick" to trigger the event change.

Visual Basic: Force App to Stop

How can I simulate; app has stopped
After I click a button? I'm trying to make my program display that (exactly) after I click a button.
easy way to do this is,
let your app crash in the first place ( cause some sort of exception) take a screenshot from that exact message.
Create a new form called mCrashForm, place a picturebox with the screenshot of that message ( leave out the close Program button.
Create a button in your main Form to open the crashForm with mCrashForm.Show()
Create a Button in mCrashForm which says "Close program" which executes this code snippet when pressed mCrashForm.Close()

Using Robotium with a contextual menu

I'm testing an application with Robotium, and I have a custom listview with checkboxes. When I click on a checkbox it loads a contextual menu giving the user buttons to modify and delete those items.
I can get Robotium to click the checkbox which loads the menu, but for some reason I can't get it to click on the delete button.
I've tried:
solo.clickOnActionBarItem(R.id.menu_delete);
solo.clickOnMenuItem("Delete");
solo.clickOnImageButton(1);
solo.clickOnImage(1);
So far nothing has worked. Is it possibly because I am clicking the button before the menu has popped up? How can I get Robotium to wait?
It's actually very easy, just click on the view by id:
solo.clickOnView(getActivity().findViewById(R.id.menu_edit));