• Eric Aleshire's avatar
    Fix stability issues with Autofill automation tests. · 630b62be
    Eric Aleshire authored
    1) I found in tapOnTarget, calling WebViewScrollElementToVisible then
    WebViewTapElement is fragile for some reason. Debugging seems to hint
    it's a race condition, where sometimes the window is not redrawn
    (despite reporting that the new element is on screen), causing an
    incorrect hitbox to be reported for the target element and misclicks
    to occur.
    
    Adding a 0.1s delay resolved those issues for me, and I will confirm it
    is stable on waterfall after landing. It is a little clumsy, but think
    it is plenty fine while investigating this further.
    
    2) Not sure why, but target.getAttribute('placeholder') isn't working
    for me anymore. After inspecting the HTML source for some target sites,
    return target.placeholder; seemed to be a good fix.
    
    Change-Id: Idf0bf0aca31578fc6ef0b18daa869cfba4b0160b
    Reviewed-on: https://chromium-review.googlesource.com/c/1320751Reviewed-by: default avatarEric Noyau <noyau@chromium.org>
    Reviewed-by: default avatarMoe Ahmadi <mahmadi@chromium.org>
    Commit-Queue: ericale <ericale@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#606107}
    630b62be
automation_action.mm 14.1 KB