0

I have currently a big Problem to click on a Checkbox in a bootstrap designed GUI. enter image description here

In Html it appres like this:
enter image description here

Does someone know how to press the Button of this checkbox? Because the controls are made in the background and I don't really know how to handle with this. (I have installed Selenium.WebDriver V3.14.0 , ... )

I am using a Helper-Class where I have all my Test-Actions .. Here you see the function which I want to use: enter image description here

Already tried the following things:

TestHelper.WaitAndClick(By.CssSelector("input[name='ctl00_ctl00_BaseRightContent_MainRightContent_MachineGrid_MachineGridViewGroup'][value='a3bf2573-7005-4b48-9c27-a1a3009f3e57']"), driver, 1);

TestHelper.WaitAndClick(By.XPath("//label[@for='ctl00$ctl00$BaseRightContent$MainRightContent$MachineGrid$customCheck0']"), driver, 1);

TestHelper.WaitAndClick(By.XPath("//*[@id='ctl00_ctl00_BaseRightContent_MainRightContent_MachineGrid_MachineGridView']/table/tbody/tr[1]/td/table/tbody[2]/tr/td/div[2]/table/tbody/tr[1]/td[1]/div/label"), driver, 1);

Kind Regards Alex

  • 1
    Found a very useful Post here: stackoverflow.com/questions/11908249/… changed the click in the method to this: IWebElement element = driver.FindElement(by); Actions actions = new Actions(driver); actions.MoveToElement(element).Click().Perform(); – BlindRob Feb 12 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.