Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

1 like 0 dislike
560 views
in Selenium by
edited by
Hi all,

Can you someone tell me please how can I click on Column OrderId with with value what I want ? What I must to use WinTable ?

https://postimg.org/image/ja4at2azr/

https://postimg.org/image/t9z9r5kql/

This not work for me ?

            WinTable ordersWinodws = new WinTable();

            ordersWinodws.TechnologyName = "MSAA";

            ordersWinodws.SearchProperties[UITestControl.PropertyNames.Name] = "Orders";

            ordersWinodws.SearchProperties[UITestControl.PropertyNames.ClassName] = "TForm1";

            WinTable tdbgridtable = new WinTable(ordersWinodws);

            tdbgridtable.SearchProperties[UITestControl.PropertyNames.ClassName] = "TcxGridSite";
by The go-to Tester (181 points)
Is that an HTML table?
by
No this is window application DataGrid.

2 Answers

0 like 0 dislike
by

If I do this I don't get any result of DataGrid ?

 

 

 

            UITestControl tblGrid = new WinTable(ordersWinodws);
            UITestControlCollection controlCol = tblGrid.FindMatchingControls();
            var controls = controlCol.Select(x => x.Name);
            foreach (var control in controls)
            {
                Console.WriteLine(control.ToString());
            }

 

0 like 0 dislike
by The go-to Tester (181 points)

Do you want to try using WpfCustom here?

 

 // Create Uia.Cell object
        WpfCustom tableCell = new WpfCustom(UIMap.ACVSClientApplication);
        tableCell.SearchProperties.Add("ClassName", "Uia.Cell");
by
Hi I try this but I get an error :


            WpfCustom tableCell = new WpfCustom(ordersWinodws);
            tableCell.SearchProperties.Add("ClassName", "TcxGridSite");

            Console.WriteLine(tableCell.Name.ToString());

But when I try this I get output Orders:

      WinCell tableCell1 = new WinCell(ordersWinodws);
            tableCell1.SearchProperties.Add("ClassName", "TcxGridSite");

            Console.WriteLine(tableCell1.FriendlyName.ToString());

But how Can I click on value on cell ?
by The go-to Tester (181 points)
Try below code..

Point point = tableCell1.GetClickablePoint();
Mouse.Click(tableCell1, point);


This site is for software testing professionals, where you can ask all your questions and get answers from 1300+ masters of the profession. Click here to submit yours now!

1.4k questions

1.6k answers

866 comments

1.9k users

...