add checking to make sure testing element is loaded
Merge pull request #1347 from lzhan/next

add checking to make sure testing element is loaded