title: Game automation (in CANVAS tags) using Python and Selenium, click not working
body: <p>I am trying to automate a game which is completely inside CANVAS tags and there are no other element inside it to interact. So I googled to find out if there was a way to handle the elements inside CANVAS tag. But I found a small python script that requires an image of the state of element and then matches with the one on screen and then uses move_by_offset function of selenium and I added further to perform click operation.
  Now the problem here is it does find the element first when the code starts,  but subsequent elements  although it says it found, but doesnt click on them. and For one element which is already in GreyScale
  (and because the code converts al of them RBG2Grey , so even when that element is present it says out of bounds.</p>
  <p>HTML of the Game</p>
  <pre><code>&lt;div class=&quot;game&quot; style=&quot;position: fixed; top: 0px; left: 307.98px; width: 750.039px; height: 422px; visibility: visible;&quot;&gt;
  &lt;canvas class=&quot;layer1&quot; id=&quot;layer1&quot; width=&quot;1365&quot; height=&quot;768&quot; style=&quot;position: absolute; top: 0%; left: 0%; width: 100%; height: 100%; display: none; pointer-events: none;&quot;&gt;&lt;/canvas&gt;
  &lt;/div&gt;
  </code></pre>
  <p>Can someone help me resolving the above issues. Please let me know where to attach the Python code for you to analyze as there is not attachment button</p>
  <p>thanks in advance</p>