javascript - Wait until login button is manually clicked in selenium webdriver using Java -


is possible in selenium webdriver pause code execution using webdriver.wait until user clicks login button form? form contains captcha user has manually fill in, can't automatically click button using script. login button on click returns value of javascript function in form of boolean value i.e either true or false.

any possible solution problem?

edit: new response after getting more info.

with code below, happens:

  1. selenium enters user data
  2. i manually refresh page (because don't have login data test)
  3. selenium enters user data again

(the variable w earlier defined webdriverwait.)

       driver.navigate().gotourl("https://www.irctc.co.in/eticketing/loginhome.jsf");          // try looping long you're on relevant page                 {             try             {                 iwebelement username = w.until(expectedconditions.elementisvisible(by.id("usernameid")));                 iwebelement password = driver.findelement(by.name("j_password"));                 if (string.isnullorempty(username.getattribute("value")))                 {                     username.sendkeys("a");                     password.sendkeys("b");                 }             }             catch (exception)             {                  // page reloading, wait round             }         } while (!string.equals(driver.url, "put url after login here")); 

Comments

Popular posts from this blog

cakephp - simple blog with croogo -

How to group boxplot outliers in gnuplot -

bash - Performing variable substitution in a string -