Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- People.prototype.deleteAllPeople = function(){
- var numOfPeople = this.getNumOfPeole();
- for (var i = 0; i < numOfPeople; i++) {
- try{
- this.click(this.By.xpath(this.getPeopleByOrder(i) + this.classContains('padding')
- + this.xPathContainText("Delete")));
- }catch(error){
- this.log("Cannot delete people " + i);
- }
- }
- };
- People.prototype.getNumOfPeole= function(){
- return this.driver.executeScript(
- "return jQuery(function($) { "
- + 'return $("div.single-pane").length;'
- + " }); "
- );
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement