In the page I\'m testing, two buttons may be displayed: BASIC or ADVANCED.
I want to be able to tell if the ADVANCED button is showing -- and if so, click it.
<
You can achieve this by using the Selenium protocol "element" and a callback function to check the result status to determine if the element was found. For example:
browser.element('css selector', '#advanced-search', function(result){
if(result.status != -1){
//Element exists, do something
} else{
//Element does not exist, do something else
}
});