Selenium php-webdriver check attribute after click

Viewed 1677
<a class="lnk" href="http://www.google.com">Go Google</a>

When click on this link, another css class 'loading' will append. How do we test this before redirecting to google.com.

$element = $driver->findElement(WebDriverBy::className('lnk'));
$element->click();

Is there any way to check the class attribute contains 'loading' before redirecting to destination?

2 Answers
Related