Do you know what is the difference between "type" and "typeandwait" command?



Do you know what is the difference between "type" and "typeandwait" command?..

Answer / Ravi Tewari

The `type` method in WebDriver only types the specified text into an input field, but it does not wait for the text to be displayed. The `typeAndWait` method, on the other hand, types the specified text and also waits for the text to be displayed before continuing with the next action.nnHere's an example of using the 'type' method:n```javandriver.findElement(By.id("someId")).sendKeys("Hello World");n```nAnd here's an example of using the 'typeAndWait' method:n```javandriver.findElement(By.id("someId")).sendKeys("Hello World", Keys.RETURN).then(ExpectedConditions.visibilityOf(driver.findElement(By.id("someId"))));n```

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Automation Testing AllOther Interview Questions

Do you know what is selenese?

1 Answers  


What automating testing tools are you familiar with?

0 Answers  


can any one please tell me QTP 9.2 supports which version of IE and Mozilla firefox.

1 Answers  


Suppose we r running a test which have 7 to 8 steps for different functionallity of and object..and suppose upto 4 step test passes but after 5th step test fails. what u will do in this condition will u start the test again or will u consider that rest steps will be working fine.

1 Answers   Logica CMG,


Which is the best testing institute for Selenium training in Hyderabad.

1 Answers  


what are the questions that are generally asked in an interview if a person is having 3-4 years of exp..and in ds exp 2 yrs exp is wd automation testing

1 Answers  


What are the drawbacks of test automation?

1 Answers  


How do you Test Credit Card Validation

2 Answers   V2 Solutions,


how can we reverse the string without using the revese of String function in QTP?

1 Answers  


Does automation replace manual testing?

1 Answers  


How you will evaluate the tool for test automation?

1 Answers  


WHAT WE CAN NOT DO WITH QTP? GIVE 5 POINTS.(EXCEPT PERFOMANCE)

0 Answers  


Categories