Here's an alternate way to test Omniture tags and other click trackers. Since most of them are bound to post to an image/pixel tracking url, what we did was set up the local hosts file to point to localhost, fire up a Webrick server to handle those requests from the tests, parse the incoming query string, and return that back to the tests to verify. Your milegage may vary.
Charley Baker Lead Developer, Watir, http://watir.com On Fri, Jun 11, 2010 at 8:18 AM, Adam Reed <[email protected]> wrote: > I also use an Excel data file to generate an array for testing, but my > method for detection is a bit different: > > There are a couple of custom functions that you won't be able to see, > but their names should let you know what their purpose is. > > def check_omni > $browser.goto "http://www.domain.com#{$url}" > > html = $browser.html.to_s > code1 = 's.pageName="' + $pageName + '"' > code2 = 's.channel="' + $channel + '"' > code3 = 'var s_code=s.t' > > begin > assert_match(code1, html) > assert_match(code2, html) > assert_match(code3, html) > log_success("Does Omniture Code exist for #{$url}?") > rescue > log_failure("Does Omniture Code exist for #{$url}?") > end #begin > end #check_omni > > > On Jun 11, 4:33 am, Wesley Chen <[email protected]> wrote: > > Expect the file attached can kind of help you. > > > > Wesley. > > For life, the easier, the better. > > > > On Fri, Jun 11, 2010 at 5:29 PM, Wesley Chen <[email protected]> wrote: > > > First, you have to prepare a xls file, in the file, in the file, the > data > > > is your expected data, the format is as below: > > > s.pageName "Home Page" > > > s.channel "AAAA" > > > s.prop3 "xxxxx" > > > Please write a method, get all the data from xls out into an array/hash > A; > > > > > Second, you have to capture all the sc value out from the page source, > > > suppose the value is actual_sc_values. > > > > > *actual_sc_values = ie.html.scan(/s\..*/)* > > > The comment can capture all the s.**** out into an array, you can make > it > > > an array or a hash B. > > > > > Then, you just need compare A to B. > > > > > Do you think so? > > > > > Wesley. > > > For life, the easier, the better. > > > > > On Fri, Jun 11, 2010 at 2:58 PM, Marlon <[email protected]> > wrote: > > > > >> Ah ok, sorry I over looked this one, yes it is implemented using > > >> javascript > > > > >> Example: > > > > >> <script type="text/javascript" language="JavaScript"> > > >> s.pageName = "Home Page"; > > >> s.channel = "Home Page"; > > >> s.prop3 = "Home Page"; > > >> s.prop34 = "No"; > > >> s.eVar18 = "No"; > > >> </script> > > > > >> Can you show me a sample script for checking this? > > > > >> -- > > >> Before posting, please readhttp://watir.com/support. In short: search > > >> before you ask, be nice. > > > > >> You received this message because you are subscribed to > > >>http://groups.google.com/group/watir-general > > >> To post: [email protected] > > >> To unsubscribe: > > >> [email protected]<watir-general%[email protected]> > <watir-general%[email protected]<watir-general%[email protected]> > > > > > > > > > > DOC-239744.htm > > 117KViewDownload > > -- > Before posting, please read http://watir.com/support. In short: search > before you ask, be nice. > > You received this message because you are subscribed to > http://groups.google.com/group/watir-general > To post: [email protected] > To unsubscribe: > [email protected]<watir-general%[email protected]> > -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. You received this message because you are subscribed to http://groups.google.com/group/watir-general To post: [email protected] To unsubscribe: [email protected]
