I'm QA Automation with 7+ years of experiance in C#+Nunit+Webdriver. Now I have to switch to CodeceptJS and can't find how to do some common actions using this framework. Please, help me with next questions:
How can I get list of elements and get some attribute of specific element in this list. In C# it will be something like this:
var list = driver.FindElements(By.Xpath("*//xpath"));
How to check if element has some attribute in customsteps or pageobject?
module.exports = { MyElemThatIsNotAlwaysVisible_Likesubmenu: { id: "submenu" }, MyElementThatIsAlwaysVisible_Likemuenu : {id: "menu"} function_click_onelement_that_notalwaysvisible () { //here I want to check if(MyElementThatIsAlwaysVisible.getattribute("class").contains("not-active")) { MyElementThatIsAlwaysVisible_Likemuenu.click(); wait.until (MyElemThatIsNotAlwaysVisible_Likesubmenu.Displayed) } MyElemThatIsNotAlwaysVisible_Likesubmenu.Click(); } }