public void ResetProduct(string accessGroupName, string productName, DeltaChange deltaChange) { webDriver.FindElement(By.XPath("//div[@title='" + accessGroupName + "']/../..//input[@name='chkAccessGroup']")).SendKeys(Keys.Space); SettingsButton.SendKeys(Keys.Enter); webDriver.WaitForElementVisible(By.Id("ctl00_ContentPageHolder_ManageGroupsContainer_AccessGroupTab_ManageAccessGrps_uc_PublishAndUpdate_img_Update"), TimeSpan.FromMinutes(2)); webDriver.FindElement(By.XPath("//table[@id='ctl00_ContentPageHolder_ManageGroupsContainer_AccessGroupTab_ManageAccessGrps_MyTable']//span[text()='Standard Configurations'][contains(@onclick,'return')]")).Click(); IWebElement chkElement = ContentTable.FindElement(By.XPath("//tr[@title='" + productName + "']")).FindElement(By.XPath(".//input[contains(@id,'ctl00_ContentPageHolder_ManageGroupsContainer_AccessGroupTab_ManageAccessGrps_grpchk')]")); switch (deltaChange) { case DeltaChange.Add: if (chkElement.Selected) { chkElement.SendKeys(Keys.Space); } break; case DeltaChange.Remove: case DeltaChange.Modify: if (!chkElement.Selected) { chkElement.SendKeys(Keys.Space); } break; } AccessGroup_UpdateButton.SendKeys(Keys.Enter); webDriver.WaitForPageLoad(TimeSpan.FromMinutes(2)); }