fix intermittently failing jobs selenium specs
fix intermittently failing jobs selenium specs

added wait_for_ajax_requests to make sure the page is finished
loading before selecting a button

Change-Id: Ic9ef7ea84a3c885ca03aa7993fdbdae5f86e4d03
Reviewed-on: https://gerrit.instructure.com/10013
Tested-by: Hudson <dfb64870173313a9a7b56f814c8e3b33e268497a@instructure.com>
Reviewed-by: Jake Sorce <c8d99c2f7cd5f432c163abcd422672b9f77550bb@instructure.com>

Unow/canvas-lms,jay3126/canvas-lms,shidao-fm/canvas-lms,shidao-fm/canvas-lms,samuels410/greatlakes-lms,instructure/canvas-lms,landonwilkins/canvas-lms,fronteerio/canvas-lms,nditech/red-innovadores-lms,loganrun/pincan,instructure/canvas-lms,parbros/red-innovadores-lms,jay3126/canvas-lms,Unow/ins,em2/canvas-lms,roxolan/canvas-lms,juoni/canvas-lms,ShreniiNepal/shrenii_lmp,sfu/canvas-lms,wimemx/Canvas,instructure/canvas-lms,samuels410/greatlakes-lms,sdeleon28/canvas-lms,tgroshon/canvas-lms,antoniuslin/canvas-lms,greyhwndz/canvas-lms,leftplusrightllc/canvas-lms,fronteerio/canvas-lms,arrivu/jigsaw-lms,wimemx/Canvas,wye0220/shindig-canvas,Jyaasa/canvas-lms,whalejasmine/canvas-lms,arrivu/hiring-site,snehakachroo1/LSI_replica,arrivu/qibla-ecampus,ShreniiNepal/shrenii_lmp,em2/canvas-lms,matematikk-mooc/canvas-lms,arrivu/hoodemo,grahamb/canvas-lms,usmschuck/canvas,wimemx/Canvas,djbender/canvas-lms,landonwilkins/canvas-lms,sfu/canvas-lms,va7map/canvas-lms,jay3126/canvas-lms,skmezanul/canvas-lms,Jyaasa/canvas-lms,whalejasmine/canvas-lms,djbender/canvas-lms,wrdsb/canvas-lms,arrivu/hoodemo,Rvor/canvas-lms,matematikk-mooc/canvas-lms,sdeleon28/canvas-lms,djbender/canvas-lms,utkarshx/canvas-lms,arrivu/hiring-site,antoniuslin/canvas-lms,Rvor/canvas-lms,skmezanul/canvas-lms,rup/Tarrax,instructure/canvas-lms,gbleydon/canvas-lms,antoniuslin/canvas-lms,wrdsb/canvas-lms,kyroskoh/canvas-lms,dgynn/canvas-lms,snehakachroo1/LSI_replica,efrj/canvas-lms,SwinburneOnline/canvas-lms,usmschuck/canvas,samuels410/greatlakes-lms,narigone/canvas,shidao-fm/canvas-lms,greyhwndz/canvas-lms,greyhwndz/canvas-lms,gbleydon/canvas-lms,eCNAP/CANVAS,wrdsb/canvas-lms,wye0220/shindig-canvas,kyroskoh/canvas-lms,instructure/canvas-lms,va7map/canvas-lms,sfu/canvas-lms,narigone/canvas,utkarshx/canvas-lms,icelab/canvas,sfu/canvas-lms,djbender/canvas-lms,SwinburneOnline/canvas-lms,HotChalk/canvas-lms,sli7246/canvas_branch,landonwilkins/canvas-lms,arrivu/hiring-site,merichar/canvas-lms,redconfetti/canvas-lms,merichar/canvas-lms,Unow/ins,dgynn/canvas-lms,ankithbti/canvas_lms,fronteerio/canvas-lms,wye0220/shindig-canvas,va7map/canvas-lms,narigone/canvas,kyroskoh/canvas-lms,grahamb/canvas-lms,utkarshx/canvas-lms,eCNAP/CANVAS,sfu/canvas-lms,AndranikMarkosyan/lms,snehakachroo1/LSI_replica,roxolan/canvas-lms,AndranikMarkosyan/lms,ShreniiNepal/shrenii_lmp,juoni/canvas-lms,sfu/canvas-lms,icelab/canvas,icelab/canvas,shidao-fm/canvas-lms,efrj/canvas-lms,tgroshon/canvas-lms,instructure/canvas-lms,venturehive/canvas-lms,sdeleon28/canvas-lms,arrivu/arrivu-lms,matematikk-mooc/canvas-lms,eCNAP/CANVAS,usmschuck/canvas,Rvor/canvas-lms,ankithbti/canvas_lms,juoni/canvas-lms,Unow/ins,juoni/canvas-lms,efrj/canvas-lms,jay3126/canvas-lms,va7map/canvas-lms,arrivu/arrivu-lms,leftplusrightllc/canvas-lms,efrj/canvas-lms,leftplusrightllc/canvas-lms,parbros/red-innovadores-lms,skmezanul/canvas-lms,tgroshon/canvas-lms,wrdsb/canvas-lms,redconfetti/canvas-lms,kyroskoh/canvas-lms,arrivu/arrivu-lms,skmezanul/canvas-lms,sli7246/canvas_branch,instructure/canvas-lms,parbros/red-innovadores-lms,roxolan/canvas-lms,eCNAP/CANVAS,sli7246/canvas_branch,SwinburneOnline/canvas-lms,grahamb/canvas-lms,tgroshon/canvas-lms,venturehive/canvas-lms,ankithbti/canvas_lms,loganrun/pincan,gbleydon/canvas-lms,AndranikMarkosyan/lms,AndranikMarkosyan/lms,landonwilkins/canvas-lms,merichar/canvas-lms,Jyaasa/canvas-lms,HotChalk/canvas-lms,rup/Tarrax,utkarshx/canvas-lms,arrivu/jigsaw-lms,venturehive/canvas-lms,whalejasmine/canvas-lms,arrivu/hoodemo,arrivu/jigsaw-lms,grahamb/canvas-lms,loganrun/pincan,narigone/canvas,HotChalk/canvas-lms,snehakachroo1/LSI_replica,SwinburneOnline/canvas-lms,redconfetti/canvas-lms,samuels410/greatlakes-lms,arrivu/qibla-ecampus,Unow/canvas-lms,nditech/red-innovadores-lms,em2/canvas-lms,HotChalk/canvas-lms,Rvor/canvas-lms,sdeleon28/canvas-lms,matematikk-mooc/canvas-lms,rup/Tarrax,ShreniiNepal/shrenii_lmp,roxolan/canvas-lms,grahamb/canvas-lms,redconfetti/canvas-lms,Jyaasa/canvas-lms,leftplusrightllc/canvas-lms,antoniuslin/canvas-lms,Unow/canvas-lms,arrivu/qibla-ecampus,dgynn/canvas-lms,venturehive/canvas-lms,whalejasmine/canvas-lms,dgynn/canvas-lms,greyhwndz/canvas-lms,fronteerio/canvas-lms,usmschuck/canvas,sfu/canvas-lms,nditech/red-innovadores-lms,nditech/red-innovadores-lms