T
T
teodor7teodor72017-03-08 14:46:03
JavaScript
teodor7teodor7, 2017-03-08 14:46:03

How to fill in the field in Selenium to determine whether the verification passed?

How to fill in a field in Selenium to determine if the field has passed verification? with correct information, the div acquires the .success class, and in case of an error, the .error class.
It is necessary while filling out the form to wait for the check after the class appears in the div and then continue. And in case of an error to throw out in a broad gull. I look at the documentation but I don’t understand how to wait for the appearance of the class.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
F
Fat Lorrie, 2017-03-08
@Free_ze

driver.wait(function() {
    return driver.findElement(locator).isDisplayed();
}, timeout);

Where locator is the search criteria, in your case, by CSS class.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question