c# - Unpredictable Selenium WebDriver Behavior -
i have several selenium tests run. today, working on them, several kept failing. had been passing. investigated issue little further in code , found in place. ran them again with; failed.
i did bit, tweaking code here , there, trying figure out why failing. then, out of frustration, reverted changes , "helped" test along clicking on element said couldn't find (clearly, there , code looking correct element). test passed. re-ran test without helping along. of tests passed. i've run situation before, , closing visual studio , starting fresh seemed trick.
this behavior not consistant , little frustrating. how can avoid situations this?
there thousands different reasons why tests can fail. specially ui test flakiest kind of test. however, not sure has closing , reopening visual studio. if reason, want investigate root cause or how related test. use visual studio , never ran such scenario. since mentioned, elements there think element load issues. may find explicit wait helpful in case. ajax calls , refresh part of dom killer ui test. without knowing detail or seeing test code suggest find element essential explicit wait or provide test code having trouble further help.
Comments
Post a Comment