Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. //function looks for 'el', then switches iframe and extracts the desired cssValur, then compares it to the 'value' we expect
  2. Page.checkCssValue = function (el, cssValue, value){
  3. //find function, the '0' represents the iframe index
  4. var newEl = this.find(el, 0);
  5. return newEl.getCssValue(cssValue).then(function(result){
  6. if(result !== value){
  7. console.log(result + " and " + value + " Do not Match.")
  8. return Page.checkCssValue(el, cssValue, value);
  9. }
  10. else{
  11. console.log(result + " and " + value + " Do Match!")
  12. return result;
  13. }
  14. });
  15. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement