Code to traverse through wpfgrid and click on the wpfimage for the corresponding in Coded UI
Hi,
I have a wpf application which has wpftable having columns as name, type, created date, modified date and an image. (On click on this image, edit and delete button will be displayed for each row).
I am trying to do edit and delete operations for a row by giving input as the name as name is unique. I need coded ui test method to traverse through this wpftable identify the row with the name provided, click on the image and select edit or delete
options.
Please refer the screenshot below:
Please anyone provided me code for this in c# for coded ui test. Because for the wpfimage properties added in my respository are very less. Hence facing this issue.
Thanks in advance.
Regards,
G.Madhavi
Sure Edward.
Below is the method I have used. As I have already described the input for my method is the WpfTable, the name for which I need to perform edit or delete options and columnindex (this is used because I need to click on the image. And I have such similar
tables across the application and want to reuse the method. The rowindex changes based on the input name but the columnindex would be same).
Please refer the screenshot above forbetter understanding.
public boolVerifyEditing(WpfTableTargetTable, stringName, string columnIndex)
bool searchRes = false;
int rowIndex = 0;
foreach (WpfRow UIRow in TargetTable.Rows)
foreach (UITestControl cell in UIRow.Cells as UITestControlCollection)
var cellcontents = cell.GetChildren();
foreach (var content in cellcontents)
WpfText wpfText = content as WpfText;
if (wpfText!= null && wpfText.DisplayText.Equals(Name, StringComparison.OrdinalIgnoreCase))
cell.Container = TargetTable;
cell.SearchProperties.Add(WpfCell.PropertyNames.RowIndex, rowIndex.ToString());
cell.SearchProperties.Add(WpfCell.PropertyNames.ColumnIndex, columnIndex);
var contents = cell.GetChildren();
foreach (var child in contents)
WpfImage image = child as WpfImage;
Mouse.Click(image);
searchRes = true;
break;
if (searchRes)
break;
if (searchRes)
break;
if (searchRes)
break;
rowIndex++;
return searchRes;
I will use this method, which clicks on the row for which I need to perform edit or delete operations. Then I click on Edit or delete button.
This suffices my requirement. Hope this helpothershaving same issue.
Regards,
Madhavi
Similar Messages
-
I am unable to redeem my purchase of a Photoshop Elements 12 software license. After entering the redemption code and clicking on the Redeem button, nothing happens. No error message. Screen does not change.
try using a different browser, or contact support Contact Customer Care
-
One more reason to put my iMAC at the curb. I can open and view Picasa photo links when I sign in via Google, but if I'm in Mail and click on the Picasa image link (my own or one someone else sends me) I can't view the images. They are all blank white squares. This started a few weeks ago. Why can't I view Picasa link images through Mail?
What you are experiencing is 100% related to Malware.
Sometimes a problem with Firefox may be a result of malware installed on your computer, that you may not be aware of.
You can try these free programs to scan for malware, which work with your existing antivirus software:
* [http://www.microsoft.com/security/scanner/default.aspx Microsoft Safety Scanner]
* [http://www.malwarebytes.org/products/malwarebytes_free/ MalwareBytes' Anti-Malware]
* [http://support.kaspersky.com/faq/?qid=208283363 TDSSKiller - AntiRootkit Utility]
* [http://www.surfright.nl/en/hitmanpro/ Hitman Pro]
* [http://www.eset.com/us/online-scanner/ ESET Online Scanner]
[http://windows.microsoft.com/MSE Microsoft Security Essentials] is a good permanent antivirus for Windows 7/Vista/XP if you don't already have one.
Further information can be found in the [[Troubleshoot Firefox issues caused by malware]] article.
Did this fix your problems? Please report back to us! -
A magazine's app on my iPad has stopped working. When I open the Newsstand folder and click on the app, the screen dims briefly, then returns to the Newsstand folder. The other app in my Newsstand folder (Wall Street Journal) opens without any problem, and this magazine's app opens just fine on my wife's iPad.
I have deleted the app and reinstalled it from the Apple store and that makes no difference. I have also done a hard reboot on my iPad with no result.
Any thoughts about what might be wrong?Hey everyone in Apple world!
I figured out how to fix the flashing yellow screen problem that I've been having on my MBP! Yessssss!!!
I found this super handy website with the golden answer: http://support.apple.com/kb/HT1379
I followed the instructions on this page and here's what I did:
Resetting NVRAM / PRAM
Shut down your Mac.
Locate the following keys on the keyboard: Command (⌘), Option, P, and R. You will need to hold these keys down simultaneously in step 4.
Turn on the computer.
Press and hold the Command-Option-P-R keys before the gray screen appears.
Hold the keys down until the computer restarts and you hear the startup sound for the second time.
Release the keys.
I went through the 6 steps above twice, just to make sure I got rid of whatever stuff was holding up my bootup process. Since I did that, my MBP boots up just like normal. No flashing yellow screen anymore!!
(Note that I arrived at this solution when I first saw this page: http://support.apple.com/kb/TS2570?viewlocale=en_US)
Let me know if this works for you!
Elaine -
When I try to download Adobe CreativeCloud with my code I receive this message and cannot succeed the operation.
See the message below and help me to finish this operation and install the soft :
Le pays dans lequel cette carte a été achetée ne coïncide pas avec votre ID Adobe. Essayez de vous connecter avec un autre ID Adobe ou prenez contact avec nous si nécessaire. Contacter le support techniqueJkpakpo please utilize a different web browser or install the Adobe Creative applications through the Creative Cloud Desktop application. You can find more details at Install and update apps - https://helpx.adobe.com/creative-cloud/help/install-apps.html.
-
Question: When I want to send SMS and click on the contact, the contact came out with names and numbers, as if the whole contacts are there in the phone. However, when I open the contact, I can only see 3 contact names and the rest of 4000 plus contacts are not listed, and it makes you difficult to call through contact
The iPhone remembers information about previous contacts.
Complelely independently, you have a Contacts app with a contacts list. It sounds like your contacts list has 3 names on it. You need to add a few names. -
When I open up iphoto and click on the events tab then double click on an event, it used to show minis of all the photos in that event. Now it shows only one photo at a time. How do I get it back? Can you help?
On the bottom bar of the window (on the left iPhoto 11, on the right in other versions) note the slider. Drag it left.
Regards
TD -
I have an icloud account which I can access via the web but when I go to systems preferences and click on the icloud it sends me to the mobileme closed site?? How do I get it to go to my icloud log in?
You're saying that when you click on the iCloud preference pane button it sends you to the defunct MMe
rather than giving you this?
Is your profile up to date, i.e. are your running 10.7.5? Make sure you click on the iCloud button and not the MMe button.
OT -
I have two devices (Iphone and Ipad) on the same Apple ID. When I go to Icloud and click at the "find Iphone" I see only one of my devices. How can I do to see both of them?
Obvious question, but have you got 'Find My iPhone' set on both devices? Settings>iCloud>Find My iPhone.
-
I have set up my airprint wifi printer which works perfectly with the HP eprint app. However, when i view an email and click on the top right arrow button and select "PRINT" on my ipad nothing happens????...
Also, when im viewing websites and i find something i wish to print, same again, if i simply click on the print option at the top right of the screen nothing happens... the only way I can print is if i copy the weblink of the site page then click on my HP eprint app and paste the web link, then select print, it prints off fine.. but its it such a pain to keep copying and pasting links or screen dumping emails just to print...Just to recap, this is a collection of ports I have collected over time for people who needed this information when setting up the HP ePrint app so that they could view their email from within the app. I am certain other applications also need this information. Although lengthy, I could not find a more comprehensive place to retrieve this information. Feel free to post additional information, faulty information, or other related topics below as this is simply a collection of data and it would be practically impossible to test all of them. Thank you!
Don't forgot to say thanks by giving "Kudos" if I helped solve your problem.
When a solution is found please mark the post that solves your issue.
Every problem has a solution! -
i am not getting notification on most of my apps, e.g twitter and facebook...except i go to the app and refreshed manually. its an iphone 4 and running on ios5...i have gone through everything and its still the same..help please........
I seem to be having the same problem on my brand new iPhone 4S. Everything was working fine on the phone until I updated to iOS 5.1.1, but now I no longer receive push notifications for the native Mail app, Instagram, or the Facebook app. I still seem to be receiving SMS texts and iMessages via push, but the aforementioned apps need to be opened before I can receive missed notifications (having them open in the background seems to make no difference).
Thanks for any help that you may provide!did you try notifications under settings? You can customize it as per your requirement, for each application.
check this out: http://www.gottabemobile.com/2011/10/12/ios-5-how-to-use-notification-center/ or http://reviews.cnet.com/8301-19512_7-20120625-233/ios-5-notifications-a-deeper-l ook/ -
I use iphone5, I see an app update on the app store. but when App store and click on the update tab, it doesn't show me which application to update.. just gives me a blank page.!!!! I wouldn't able to know what app has to be updated, untill and unless i get check for each every app on the app store installed on my iphone... what is the solution for this.!!!! can any1 one help me out.!!!!
Cc2528 wrote:
The iTunes Store on my iPad is set up with all my music already. And at the very bottom it shows my apple Id username. The only place it shows the previous owners id is in the App Store...
You can probably change the ID in the "iTunes and App stores" settings on the iPad....click on the wrong account ID , select sign out, then log in with your own ID, I have not done this but I think it works.....
but I would be more inclined to to the factory reset and start afresh. -
i bought my iphone 4 through ebay and its unlocked. the problem is that my phone does not sync straight away. I sync my music file through autofill. I want to sync ringtones but its not working.
I saw cidya aap so i m not sure if it was jailbroken or not before but it is back to normal settings.
My problem started when I tried to sync my music files. I pressed 'sync' all it says is waiting for sync start, preparing to sync and then waiting for the changes to be applied. but it does not sync at all.
I found a way to sync my music files through autofill but I really wanted to sync ringtones but its not syncing and I really wanted to put ringtones in my phone please help.If you see the cidya app, your iPhone is hacked with the cutsie term for this being jailbroken. This also means all the built in security has been removed making the iPhone as insecure as an android device.
Restore the iPhone with iTunes as a new iPhone or not from the backup to get rid of that hacking garbage. If the iPhone has hacked to be unlocked, the iPhone will no longer be unlocked when doing so. -
when i download software, then go to the download window and click on the program , i'am being ask to choose a launch program. how do i figure out what app to use to install. ex: i downloaded a new version of java and a game program. how do i install?
Where did you download the java?
Download it from here [https://www.java.com/en/download/index.jsp https://www.java.com/en/download/index.jsp] -
How can I embed a form on my website and set up a submit button so that when people fill out and click Submit, the filled form will be emailed to me as an attached pdf file?
Thank you!Hi;
That is not a workflow that is supported by the Adobe forms solutions at this time.
Thanks,
Josh
Maybe you are looking for
-
Keynote and Square simultaneously?
Can I use the iPad to run a Keynote presentation AND run other aps at the same time? Specifically, I want to use my iPad to run a keynote presentation and ALSO use Square to run credit card charges without disrupting the slide show. Possible?
-
How can I use/access files inside an invisible folder?
I am struggling to get Stylus RMX to show the user libraries option and am discovering that the Lion installer put all the files (8GB) into the Macintosh HD/Users/Library/Application Support/Spectrasonics/SAGE folder, but I cannot see the Macintosh H
-
How can I use "write to spreadsheet" during the data is taking but not the end of all the loops
Hi, I have to run an experiment on Labview 6 or 5. I don't have Labview 7 on that computer for some reason. My experiment is talking about 1000 hours, and I have a probelm on storing the data. Right now I am using "Write to spread sheet" and I set th
-
Why doesn't uprgrade from 10.2 to Tigerr work?
When I try installing Tiger as soon as the installation gets to "verifying destinatin volumes" it stops and I get "errors installing software, try again." What is supposed to be simple upgrade is now a mystery. In addition to the RAM that came instal
-
On my website at www.godsmarines.com, the website works fine on my domain server, but when opening in D/wcs3 and previewing in a browser I get a error message statine flash has crashed and another saing script error. Just happened 2 days ago but was