stepDefinitions/Knab.js
//functions for text and element assertion
functions for text and element assertion
functions for text and element assertion
function assertText(text) {
  browser.wait(EC.presenceOf($("//*[. = '"+ text +"']")), 50000)
  .then(function(){
  }, function(){
      expect(element(by.xpath("//*[. = '"+ text +"']")).isPresent()).to.eventually.equal(true, "" + text + " is not present.");
  });
}
function assertText ( text ) { browser . wait ( EC . presenceOf ( $ ( "//*[. = '" + text + "']" ) ) , 50000 ) . then ( function ( ) { } , function ( ) { expect ( element ( by . xpath ( "//*[. = '" + text + "']" ) ) . isPresent ( ) ) . to . eventually . equal ( true , "" + text + " is not present." ) ; } ) ; }
functions for text and element assertion
functions for text and element assertion
// var selector = element(by.xpath("//*[. = '"+ text +"']"));