william_roe
9 years agoSuper Contributor
DevExpress 15 and Click Event on Radio Controls
We are upgrading to DevExpress 15 (from 14) and experiencing difficulties with using XPath and radio controls. Specifically, once the control is found there doesn't appear to be a click event. I see that the className contain unchecked. How do I click on a radio button in DevX 15? Does it require SmartBear support?
function SelectSiteAccess() { // retrieves reference to browser var page = Aliases.browser.CribMaster.PrimaryWrapper.PrimaryContent.EmployeeGrid.sectionActionwrapper.sectionActioncontent.panel.tableSplresizing.cell2.panelSplresizing1Cc.formMainform.panelPnlgridpropertiescallback.panelPartialproperties.panelPartialpropertiesCc.Panel("partialProperties_C11").Panel(0).Article(0).Panel(0); if (Project.Variables.Employees.Value("SiteAccess") == null) { return; } // retrieves value from 'SiteAccess' column in spreadsheet var SiteAccess = Project.Variables.Employees.Value("SiteAccess").split(","); var AccessType = Project.Variables.Employees.Value("AccessType").split(","); // iterates through array of Site Access(s) and selects radio control for (var i = 0; i < SiteAccess.length; i++) { var obj = page.FindChildByXPath("//table[@id='tlEmployeeSiteAccess']//input[@id='SiteAccess" + AccessType[i] + "_" + SiteAccess[i] + "_S']", true); if (obj != null) { // clicks radio button try { obj.Click(); <====== FAILING HERE } catch (e) { Log.Error("Error clicking item!"); } } else { Log.Error("Could not locate Access '" + AccessType[i] + "'" + " for Site '" + SiteAccess[i] + "'"); } } }
I have determined the height and width are 0 in DevExpress 15 while they were 1 in DevExpress 14. I'm checking with the developers to see if they can explicitly set the values to 1.
Thanks for the replys.