I have to click on a checkbox in our application.Am able to successfully click in selenium java with the below code but am not able to do it in protractor nodejs. Can someone please help.
Selenium- Java :
Actions actions = new Actions(driver);
actions.moveToElement(element).click().build().perform();
I have tried multiple things in protractor nodejs like clicking using javascript, mouseMove and perform .But its not working. Please suggest as per the above code.
You can set up protractor with nodeJS following the setup guide on their website: https://www.protractortest.org/#/
Then it's as simple as:
const element = browser.$("input[type=checkbox].myCheckboxClass#myCheckboxID");
await element.click();