java - How can I stop webdriver execution till my condition satisfy -


i doing automation 1 application , need little .

scenario in our application when update/add showing loading image till complete process. , in webdriver not able find next element until loading image completes.

so want set condition till there loading image , stop execution , dont try find next element , once loading image hide find next element. how here can stop web driver execution till loading image there.

i trying :

webelement loading = driver.findelement(by.id(appconstants.loadingimg));      while(loading.isdisplayed()){          //what put here stop web driver execution while      } 

i tried type of wait not working me in proper way want solution above condition.

//what put here stop web driver execution while

as said tried type of wait , it's not working , in order stop execution while can make thread sleep

try{ thread.sleep(timeyouwanttowait);  // time in millis }catch(interruptedexception e){      e.printstacktrace(); } 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - Bypass Geo Redirect for specific directories -

php - .htaccess mod_rewrite for dynamic url which has domain names -