Different versions of this question have already been asked:
How can I locate a onmouseover element using Selenium in Python?
How to emulate mouseover or run JS function on page with PhantomJS in NodeJS
Basically what I want to do is to get the text from a table cell that displays when the mouse is over, as seen in the image below. I code in Python and use Beautiful Soup
I can successfully get the onmouseover attribute using Beautiful Soup:
<td class="right odds down"><div onmouseout="delayHideTip()" onmouseover="page.hist(this,'P-0.00-0-0','357osx2s5a4x0x7ot9r',2,event,0,1)">+340</div></td>
<div onmouseout="delayHideTip()" onmouseover="page.hist(this,'P-0.00-0-0','357osx2s5a4x0x7ot9r',2,event,0,1)">+340</div>
My question is. How can I get the text (the initial odd) using the attribute:
onmouseover="page.hist(this,'P-0.00-0-0','357osx2s5a4x0x7ot9r',2,event,0,1)
Any help is greatly appreciated.