I am writing a Bubbles ([url]http://www.bubbleshq.com[/url]) extension for YouMail.com. I am trying to write a script that parses the text on the web page to read how many new messages I have. It appears that the text (e.g. “1 new”) is generated by javascript and even though it is visible in the screen, I can’t find it using findtext().
Does anyone know of a way that I can search the text from the webpage.
@cu_shaneauthorAug 09.2008 — #Problem solved. Apparently, I wasn't giving the webpage enough time to finish outputting everything. I used setTimeout to wait a few seconds and then I was able to search for the text.
@Angry_Black_ManAug 10.2008 — #settimeout is inaccurate. the page may take longer to load than the settimeout checks for, or may load quicker and settimeout may be wasting time. instead, use the onload event of the body tag. that way, it never happens too soon or too late, and is completely dependent on the text youre looking for to be 100% available.