Advertisement
Guest User

Untitled

a guest
Oct 25th, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. People.prototype.deleteAllPeople = function(){
  2. var numOfPeople = this.getNumOfPeole();
  3. for (var i = 0; i < numOfPeople; i++) {
  4. try{
  5. this.click(this.By.xpath(this.getPeopleByOrder(i) + this.classContains('padding')
  6. + this.xPathContainText("Delete")));
  7. }catch(error){
  8. this.log("Cannot delete people " + i);
  9. }
  10. }
  11. };
  12.  
  13. People.prototype.getNumOfPeole= function(){
  14. return this.driver.executeScript(
  15. "return jQuery(function($) { "
  16. + 'return $("div.single-pane").length;'
  17. + " }); "
  18. );
  19. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement