I am trying to automate WPF application (WPF with 3rd party devexpress) using coded UI (VS 2012) in my local machine (Windows server 2008 R2).
I am facing issues while identifying controls under dynamically generated content of the window. I've Tried different hierarchical levels to hit the control,But i am
still not able to hit the control.
Till some level I am getting the handle, but after I am not getting the handle.
My application is complex hierarchically structured with combining winforms and WPF.
I've Tried to use coded UI record and play feature to generate the UI Map and used the same structure to identify the controls. It worked while debugging line by line but it's failing while running.
e.g. Below is one hierarchy,
List item
Dashboard
Dash_Grid
LayoutManager
LayoutGroup
LayoutPanel -->Till this level I am able to get the handle and lower I am not able to hit the control
Container
Navtop
Nav_Grid
TileLayoutControl
........(all tiles)
This issue is not only with one page. I am having the same problem with all the pages.So this is blocking our automation.
Please can any one help me on this?
Try this two possible solutions:
Use the devexpress extension for codedui to identify and locate dexExpress controls:
https://www.devexpress.com/products/net/controls/winforms/coded-ui/
Dont replicate the elaborate hierarchy of your app when identifying controls but instead select the main controls in the hierarchy and use them to set your search properties. this is especially important for dynamically created content where the hierarchy is constantly changing.
in your example:
var List_item = new WpfListItem(parent);
List_item.SearchProperties.. = some search properties
and than set your control's parent to that top list item and ignore the midlle men:
var Container = new UITestControl(List_item);
where UITestControl should be replaced with the controls actuall type.
Related
Situation: SharePoint list with two content types (CTs) - most fields are common, few are unique/exclusive to specific CTs. Plan is to utilize Power Apps canvas app that overwrites default new-edit-view forms for SharePoint items. Already created new Power App "app" with integration, app and screen components - also new screen for other content type.
Goal: when item form is prompted, open screen "assigned" to specific content type. In other words, if I want to open edit form for item with CT "A" load one screen, but if for item with CT "B" - load other. I am looking for solution that would detect CT and pick screen (form?).
Problem: how to achieve goal? Is it possible to have on-the-fly evaluation that decides which screen to load? Have tried different methods, no luck so far. Most articles describe how form contains control that user can use to make a switch - not the case here, since evaluation should be done before any form is loaded. I have tried introducing "temporary loader" form, but could not achive auto-redirect to desired screen/form.
I am creating a new footer sublayout in sitecore for use in multiple sites (we run a multi site environment). Currently a sublayout called StandardLayout is used, but I would like to change this across several of our sites to a new layout GlobalFooter.
The problem is that child items of the Home Page have overridden layout components, so what I would like to know is if there is an easy way to change the layout without losing all of the overridden components (as I expect that I may need to reset the layout in order for the flow down to occur)?
I am hoping to be able to just change the top level element (Home) and then have this flow down to the child elements, otherwise this task will become very long and tedious if I need to go through each item and change the presentation to use the new footer.
The icon circled in red in the image above indicates that the presentation has been overridden for that particular sitecore item.
To answer your question, directly, there is no way to apply an update of the presentation details of a template to templates that inherit from it that have had their presentation details changed without losing the changes.
The solution described in the blog post you linked to is the best solution for updating inherited presentation details in this manner. IMHO, I believe that this functionality should have been built into Sitecore long ago as a separate button on the ribbon, and you may choose to add one if you are so inclined. If you do not have the time to do so however, creating an admin page that you later delete from the site after using is a perfectly viable solution as well.
This post appears to detail a way that I can achieve my goal, basically I would create a admin page that does not publish and put the code in the blog into it to update the layout via a button trigger.
https://www.sitecore.net/Learn/Blogs/Technical-Blogs/John-West-Sitecore-Blog/Posts/2011/09/Programmatically-Update-Layout-Details-with-the-Sitecore-ASPNET-CMS.aspx
I have implemented a test framework trough coded UI to test msaccess application which has some buttons and dialog boxes popping up.
i have a strange problem which is, when i use coded UI it actually captures the coordinates for the control. this executes all the tests when i run from the same machine but fails to run the tests wherever the resolution changes or screen re sizes.
please let me know the way by which i can call the controls from a vba application based on their control names or id rather then coordinates.
I don't think that the coordinates is the reason that your tests are failing. These coordinates are referred to the controls themselves just to simulate the exact point you clicked on the control.
See this link: Why are we using coordinate based actions in Coded UI Test?
In Eclipse, it is possible to extend to any pop-up menu using the following special location URI:
popup:org.eclipse.ui.popup.any
Is it possible to do the same for the view menus (the little triangle in each view)? (I am developing an Eclipse RCP application, not extending the IDE. The purpose for this item is to help debugging and testing of the application.).
The short answer: no, that is not possible, unless you add the items by hand for all views.
The slightly longer answer: yes, if you
manually go through the view registry
create a new AbstractContributionFactory with the location URI "menu:<view-id>" and whatever createContributionItems(...) you want for each. (Alternatively you can create AbstractMenuAdditionCacheEntry or even better MenuAdditionCacheEntry - though these are internal and requires a little extra work... The last allows you to have a centrally defined menus extension point that is used for all these additions.)
add these to the workbench using IMenuService.addContributionFactory(AbstractContributionFactory factory) (use IWorkbenchWindow.getService(IMenuService.class) to acquire the menu service).
I haven't tested the above recipe, but I have used something very similar in an application...
I am using the XPages Extension Library mobile controls to create a mobile web interface for an existing Notes app.
When displaying a document with a large number of fields I would like to use an accordion type UI so that parts of the page can be expanded or collapsed to show or hide the fields in each pane (similar to sections in a traditional Notes client app).
Having looked at the "Accordion Outline" in the Ext Lib demo app I started to build the page using the Outline control. Within each entry (node) of the Outline I, ideally, want to place a rounded list and then put my fields & controls inside that.
But it looks like the nodes in the Outline can't contain this type of content - unless I'm missing something?
Any suggestions as to which controls I can use this type of UI?
Thanks
You can any time use an xp:panel and assign it the dijit.accordeon (look up the exact name please) dojo type. Then you can put anything inside including repeat controls etc. I would guess it might make sense to build your own CC to hold the content for each accordeon panel