I need to read ask/bid price from crytpocurrency market. but "Stale Element Error" occurred when market is too crowd.
I use facebook/php-webdirver, Selenium Stand Alone Server 3.9.1.jar and chromeDriver and PHP 7.1 .
this is my first try to select data:
$driver->findElements(WebDriverBy::xpath("//tr[@class='price-level']//td[@class='bid-price']"));
and its the last one:
$driver->wait()->until(WebDriverExpectedCondition::presenceOfAllElementsLocatedBy(WebDriverBy::xpath("//tr[@class='price-level']//td[@class='bid-price']")));
First question is am I in a right way to get this rapidly changeable data (like stock market or cryptocurrencies market)? cryptocurrency BID-ASK tables screenshot - from Bitz Bitz Cryptocurrency live BID-ASK table
And the second one is why when i use below Code to avoid fatal Error, nothing happened and fatal Error occurred as always ?
try{
$asks = $driver->findElements(WebDriverBy::xpath("//tr[@class='price-level']//td[@class='ask-price']"));
}catch(StaleElementReferenceException $e)
{
echo 'Error Occurred';
}