How to select menu item from Chrome Context menu using Selenium VBA - vba

I am using VBA and Selenium and I want to select a menu item on a Chrome Context menu. The context menu is displayed using the below VBA code but the sendkeys doesn't move the cursor down on the context menu.
bot.Actions.ClickContext(bot.FindElementById("chTrend")).SendKeys(bot.Keys.Down).SendKeys(bot.Keys.Down).Perform
This is the context menu that is displayed with the above code.
I want to select "Save Image" (2nd option) from the Chrome context menu.
Appreciate your help.

Related

How to keep the dropdown list open in robot framework

Here, I will click the actions tab and select create new project from the drop down list.
While executing the script in robot framework, after clicking the actions tab the drop down list will be opened and after few seconds it automatically got closed.
I need to know how to keep the list to be in open.
Most likely, what is happening is that the library you use to create the dropdown is designed to dismiss the dropdown when the mouse leaves the dropdown. If that is the case, the solution is to first move the mouse over the dropdown before clicking on it.
The SeleniumLibrary has a Mouse over keyword that will simulate the mouse being over the element.

Visual Studio change default startup form when debugging

Whenever i click start on a VS project, it opens with the default form set in properties. How do i change it so that form i am working on is loaded instead of the properties startup form. I am using VS2013 Ultimate.
You can open the Project Designer window by right-clicking My Project in the Solution Explorer window and then clicking Open on the context menu. Or, you can click Project on the menu bar and then click Properties on the menu.
1.
Right-click My Project in the Solution Explorer window, and then click Open to open the Project Designer window.
2.
Auto-hide the Solution Explorer window.
3.
If necessary, click the Application tab to display the Application pane. If frmMain does not appear in the Startup form list box, click the Startup form list arrow and then click frmMain in the list.

Unable to find button of dialog in coded ui test

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);

dojox form uploader button is clickable only on the border, but not on the full button

I am using IE8
I have created dojo button as below
It has displayed button "Select Files".
Problem
When I click on top border of button its working fine. When I click on any other places on button file picker dialogbox is not displaying.
When I right click on button and select zoom in option once, I am able to click on all the coordinates of button(after selecting zoom option, it works similar to html button).
Note: I have used flash for multiple file selection.
Please tell how to make this button work by clicking in any place.
Have you checked if there is other element's borders in front of the button? Try to check with the developer tools option activated on your browser and select "inspect element" (or similar). If another element is detected when you hover over the button, you have your answer.
Apart from that I have no more ideas.

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));