selenium.click is not working while running the script when selecting an item from a list generated by Ajax search - selenium-ide

The functionality is such that some search criteria is entered in a search box, an ajax search is performed and a list of items matching the search criteria is shown. An item is selected from this list and gets loaded into the search input box. When i am recording using Selenium IDE, the selecting of item from the list, the command is click. But when i am running the script with the click command, it seems it is not selecting the item from the list and loading it into the box. Some one please suggest what command should i use. I have tried with clickat() but it doesnt work.
I am using Selenium IDE 1.5.0 to record and writing scripts in Eclipse Junit platform.
Thanks in advance.

I'm sure it's a timing issue. The click in the list happens before it is present in browser. You should add before the click command an explicit wait like "waitForElementPresent".

I found the solution for the above scenario. I am using Actions class. Using that I am focusing on the search item that fulfills my criteria and performing click action (instead of using click() and clickat() methods)
Actions builder = new Actions(driver); builder.moveToElement(item).build().perform();
//item is the search item i want to select item.click();

Related

CRM365 On Prem - Document Templates: how to hook the select event in the form menu

The CRM365 Form displays a convenient document template dropdown button where a number of actions could be initiated. Additionally, it displays the list of already existing document templates. The user can select one template in the list and it is downloaded locally by your browser. So far all good.
Our goal is actually to select the template, retrieve it, and create it in a Document Management repository. We have a working solution for this but it involves too many pieces and steps so we are looking for some better ideas.
Ideally we are looking for a solution where we can:
"intercept" the click on the template item and run a JavaScript function
If we find a solution to this, the rest would be just calling our custom workflow to do the rest of the job.
So, is there any way to hook that "select/click" event from the form menu?
Thank you very much for your help and advice.

How do I select elements within div frames?

I am pretty new to Selenium IDE, hoping to use it with a certain web app which a client would like to be able to run automated tests for after periodic uplifts. The tests would all involve only clicks and text entry.
I cannot get the application to execute clicks on certain form elements on specific pages.
My test so far is simple. I am simply navigating to a page and trying to click an icon whose target, according to the IDE, is "css=#MGOpenButton-btnEl > .btn-icon". The Selenium IDE will register the click as having been performed successfully (i.e. no failures) but the actual desired output of the click (i.e. a pop-up search box appearing) isn't actually happening. I have tried click, click at, double-click, mouseover before click, all to no success.
Reading back through some other topics, I thought it may have something to do with the element being embedded in frames, but if that is the case I'm not sure how the click is being read as successful by the IDE. The second thing I'm wondering is if it might not be playing nicely with Javascript.
Is it common for the basic IDE front-end functionality to fail when a webpage incorporates Javascript?

How to access query from query results toolbar menu VSTS extension?

I am trying to write a VSTS Extension which allows me to clone a set of work items including links to a different area path.
To do this I have created an extension that uses the "ms.vss-work-web.work-item-query-results-toolbar-menu" contribution to create a toolbar menu item in the work item query results.
Ideally I would like to know the set of selected work items from the query to perform my clone on, but from what I have read this is not possible. I can live with running the clone on the whole query set, but I have not been able to figure out how to know what query was run from my extension.
How can you access the parent of the extension to know which query was run? I should be fine with running the TFS code to get the query results and perform the clone operation once I have that information.
The documentation for the client APIs is lacking, and the "hello world" examples they always provide do nothing but show the basics of the creation of the toolbar item and not any integration. I have checked through the Core client VSS SDK and could not find any object that contained the parent query.
I am also not able to access the parent URL to get the query from that as the extension runs in an IFRAME and that would be cross site scripting.
I appreciate any help with this.
Well I figured it out. You have to use the actionContext from the callback that gets invoked when your extension is invoked. I haven't found a reference for the actionContext, but by inspecting it in the browser, for the query toolbar menu item you get properties for the query, queryText and workItemIds.
This documentation has an example for the team information:
https://learn.microsoft.com/en-us/azure/devops/extend/develop/web-navigation?view=azure-devops

Attribute customization in RTC eclipse UI

I am customizing work item in RTC.
When work item is created in summary attribute, there is a condition that work item shall be saved when summary contains minimum three words e.g "this is summary".
Is it possible to do with eclipse UI customization, without need to create plug in.
I think that the best way will be using regular expression validator.

MOSS 2007 - Customize Send To Menu

We currently have a need to add a custom menu item to the Send To menu within our document libraries that would allow a user to create a link to the currently selected list item within another library. When the user clicks on the new "Send Link to..." menu item, they should be prompted to browse to the library in which the link should be added. Once the user chooses a destination, the link, along with the metadata from the list item, should magically appear in the selected desitnation library. Once again, we only want a link, not a copy of the file. Is this possible to do? Code examples would be much appreciated.
Does it have to be in the send to menu? Can it also be directly in the context menu (say at the bottom)? If so, you can create a feature that deploys a CustomAction to the site. If it really, REALLY needs to be under the "send to" menu, you are going to have to use javascript (since that is how the out of the box context menu is created) to "hijack" the menu and insert your own item.
IMHO this is rarely needed, a CustomAction is the preferred way of doing this. It is the easiest and most "maintainable" (all it is is a feature + customaction definition with maybe some code, all of which are deployed using a solution).
More info on CustomActions here.
P.S. if you do decide to go with javascript, don't go editing the out of the box sharepoint js files in SharePoint's 12 Hive, but add a ContentEditorWebPart to the page and insert your Javascript in there.
P.P.S. While assigning a method from an assembly as the action for a CustomAction is allowed in most cases, it is not for the ListEdit (item) context menu.
What they say is that "Sharepoint server 2010 will have it out of the box", i.e. documents may stay where they were created and links go to the Records center (named "In Place Records Management, see http://www.cmswire.com/cms/document-management/the-scoop-sharepoint-2010-records-management-005948.php).
MOSS 2007 requires the actual document to be copied to the Records repository to be registered.