angularjs - Social Login with protractor -
i'm trying login in app google , protractor. can't find error. seems element not present element working fine in test. please me this.
here test's code
browser.getallwindowhandles().then(function (handles) { var popuphandle = handles[1]; browser.switchto().window(popuphandle); var email = browser.driver.findelement(by.name('email')); var signin = browser.driver.findelement(by.name('signin')); email.sendkeys(browser.params.login.user || process.env.google_user); signin.click(); browser.driver.sleep(2000); var password = browser.driver.findelement(by.name('passwd')); password.sendkeys(browser.params.login.password || process.env.google_pass); var login = browser.driver.findelement(by.css('.rc-button')); login.click(); browser.driver.sleep(10000); browser.driver.switchto().window(handles[0]); });
and here error
16:30:05.655 info - done: [find element: by.cssselector: *[name="signin"]] 16:30:05.659 info - executing: [click: 3 [[chromedriver: chrome on linux (e0625e8b3f72a0f40228f4f4e90c2c9d)] -> css selector: *[name="signin"]]]) 16:30:05.945 warn - exception thrown org.openqa.selenium.elementnotvisibleexception: element not visible
i don't know if there workaround can't find solution in order login protractor. please help
may sign-in button enabled after email validated. should below
var ec = protractor.expectedconditions; browser.wait(ec.visibilityof(signin,5000).then(function() { signin.click()}):
Comments
Post a Comment