Rich-text Reply

How to look for a text/string on the page

inigam 05-09-16

How to look for a text/string on the page

Hi

 

Does any one know how to look for a text/string on a webpage to fire a test variation.

 

Thanks

Ikshit

Regards,
IN


Level 6

JasonDahlin 05-09-16
 

Re: How to look for a text/string on the page

If you are relying on contents of the page, either text, a data-attribute, or a variable to manually activate an experiment, you will want to learn jQuery selectors so you can target the specificelement(s) on the page that indicate the targeting condition.

 

http://www.w3schools.com/jquery/jquery_ref_selectors.asp

--Jason Dahlin
Analytics and Testing Guru Smiley Happy

Re: How to look for a text/string on the page

[ Edited ]

Could you provide a little more info on the scope of this? You're process of finding this text/string is going to be different if it is dynamically changed after page load (either by a timer or user input)

@JasonDahlin's reference above will be useful if the text/string already exists on the page onload, but if it doesn't you're going to have to take a different approach. 

Analyst
inigam 07-18-16
 

Re: How to look for a text/string on the page

err ....it is an old Q and the purpose was to find out if we can change a word / spelling thorughout the site.
Regards,
IN


Level 6