Remove some looping and reduce the number of xpath queries run to locate elements.
Remove some looping and reduce the number of xpath queries run to locate elements.

shepmaster/capybara,shepmaster/capybara,sideci-sample/sideci-sample-capybara,benlovell/capybara,ksmaheshkumar/capybara,twalpole/capybara,khaidpham/capybara,jillianrosile/capybara,jillianrosile/capybara,randoum/capybara,jillianrosile/capybara,mohanraj1311/capybara,benlovell/capybara,olivierlacan/capybara,mohanraj1311/capybara,randoum/capybara,irfanah/capybara,ksmaheshkumar/capybara,teamcapybara/capybara,randoum/capybara,pombredanne/capybara,mreinsch/capybara,pombredanne/capybara,olivierlacan/capybara,sideci-sample/sideci-sample-capybara,ngpestelos/capybara,ngpestelos/capybara,twalpole/capybara,irfanah/capybara,DariaKalynovska/capybara,olivierlacan/capybara,teamcapybara/capybara,tjgrathwell/capybara,tjouan/capybara,mlarraz/capybara,gonzedge/capybara,pombredanne/capybara,Bartuz/capybara,soutaro/capybara,teamcapybara/capybara,tjouan/capybara,ksmaheshkumar/capybara,irfanah/capybara,DariaKalynovska/capybara,mlarraz/capybara,y-yagi/capybara,mlarraz/capybara,twalpole/capybara,ngpestelos/capybara,DariaKalynovska/capybara,khaidpham/capybara,mreinsch/capybara,gonzedge/capybara,khaidpham/capybara,ducthanh/capybara,soutaro/capybara,jnicklas/capybara,mohanraj1311/capybara,jarib/capybara,wenbofantasy/capybara,wenbofantasy/capybara,shepmaster/capybara,jnicklas/capybara,gonzedge/capybara,tjouan/capybara,tjgrathwell/capybara,jnicklas/capybara,Bartuz/capybara,jarib/capybara,tjgrathwell/capybara,y-yagi/capybara,y-yagi/capybara,ducthanh/capybara,soutaro/capybara,Bartuz/capybara,ducthanh/capybara