/    Sign up×
Community /Pin to ProfileBookmark

how to search javascript generated text

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.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@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.
Copy linkTweet thisAlerts:
@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.
×

Success!

Help @cu_shane spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.29,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...