grails - Geb click executed before input is completed -
I am running a simple Geb test like this:
class index page page {// static content = {signInButton {$ ("div", 0, category: "container-liquid") on {// static url = "http: // localhost: 8080 / sampleGrailsApp" static = {title == "sampleGrailsApp"} . (To: true, wait: MyPage) appears ("button", 0)} modalFooterSignInButton {$ ("footer", 0, category: "modal-footer"). Username = this} modalFooterPasswordInput {$ ("form") password = this} sign-in {user} appears ("input", 0, class: "btn-. Primary")} modalFooterUsernameInput {$ ("form".) Name, Password - & gt; signInButton.click () waitFor {modalFooterSignInButton.present} modalFooterUsernameInput Username modalFooterPasswordInput password modalFooterSignInButton.click ()}}} In your test, this is called a page like this:
def "sign in" (given): "User index is on page" when on indexPage: Sign-in "user name" "in user's sign" "password" then: "Take on myPage On "MyPage"} On some occasions, modalFooterSignInButton.click () occurs before the user name is fully recorded Slia failed test. Has anyone encountered this before? How do I wait to complete the input before the click becomes active? I am using Geb 0.9.2.
Thanks in advance.
Try current code as current code with isDisplayed () Using the code is present in the code, but it is displayed () This means that the following items expected in the UI will solve your problem! waitFor {modalFooterSignInButton.isDisplayed ()} In addition to this, use waitFor {} in case of serious situations Nothing is known about your app.
Comments
Post a Comment