Advertisement
Guest User

Untitled

a guest
Sep 8th, 2017
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. ``var username = element(by.model('login.username'));
  2. var password = element(by.model('login.password'));
  3. var goButton = element(by.buttonText("Login"));
  4. function login_page(a, b) {
  5. username.sendKeys(a);
  6. password.sendKeys(b);
  7. goButton.click();
  8. }
  9. beforeEach(function() {
  10. browser.get('my_url');
  11. })
  12. function seldrop(element, optionNum) {
  13. console.log('in seldrop');
  14. var selectDropdownbyNum = function ( element, optionNum ) {
  15. if (optionNum){
  16. var options = element.querySelectorAll('.dropdown-toggle')
  17. .then(function(options){
  18. options[optionNum].click();
  19. console.log(options);
  20. });
  21. }
  22. }
  23. }
  24.  
  25. it('put in values', function() {
  26. login_pg('usrname', 'passwd');
  27. const selector = seldrop(element,'3');
  28. colsole.log(selector);
  29. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement