I'm facing an issue with this particular page
There is a canvas element on this page that displays changing numbers whenever the page is refreshed or reloaded.
Looking at the source code, I can only find the following:
<div class="row">
<div class="large-10 columns">
<canvas id="canvas" width="599" height="200" style="border:1px dotted;"></canvas>
</div>
</div>
Essentially, there's not much I can do with this information in the outer html. However, upon checking the network section and inspecting the response code, I discovered the following javascript code:
<script>var canvas_el = document.getElementById('canvas');
var canvas = canvas_el.getContext('2d');
canvas.font = '60px Arial';
canvas.strokeText('Answer: 19403',90,112);
</script>
My current dilemma is how to write javascript (I'm not very experienced in it) in selenium webdriver to retrieve the details, specifically the strokeText under the script tag, which are not directly available in the source code. I'm seeking a solution that involves using JavascriptExecutor.