I have a one liner Js for Selenium tests that checks if the page is done loading.
true === ((typeof Ext.Ajax != 'undefined' && Ext.Ajax.isLoading()) || (jQuery != 'undefined' && jQuery.active) || document.readyState != 'complete')
All other Java/Selenium ways to check are NOT compatible with our setup line of IE FF and Chrome tests (crap IE). We spent like 3 months of trying, so Selenium checks are out of question. This check is ok most of the time, except when the Extjs variable is not set in that page then i get the dreaded Ext is not defined exception and selenium crashes. Is there an another way to check for a variable in one liner which can do nested checks i tried object checks like in
javascript test for existence of nested object key
But when i do
((Ext|| {}).Ajax
I still get the exception.