title: CodeceptJs - Getting List of elements and checking attributes of elements
body: <p>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:</p>
  
  <ol>
  <li><p>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:</p>
  
  <pre><code>var list = driver.FindElements(By.Xpath("*//xpath"));
  </code></pre></li>
  <li><p>How to check if element has some attribute in customsteps or pageobject?</p>
  
  <pre><code>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();
   }
  }
  </code></pre></li>
  </ol>