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 <cjq....@gmail.com> 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 <cjq....@gmail.com> 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 <marlonmoja...@gmail.com> 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: watir-general@googlegroups.com > >> To unsubscribe: > >> watir-general+unsubscr...@googlegroups.com<watir-general%2bunsubscr...@googlegroups.com> > > > > 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: watir-general@googlegroups.com To unsubscribe: watir-general+unsubscr...@googlegroups.com