This isn't going to work. Even if you didn't get the load error, you would see a syntax error when you tried to use the field. This is a ruby syntax error because class is a reserved word:
view_activity_pattern_page.class = 'whatever' As a workaround, people usually use "klass" instead. Bret [email protected] wrote: > I have a field which should be defined as > > class ViewActivityPatternPage < Taza::Page > .... > > field(:class) {logon_frame.span > (:id, /.*:ActivityClass$/)} > > ... > > end > > but as soon as the page object is instantiated I get > > undefined method `class_field' for > #<ClaimCenter::ViewActivityPatternPage: > 0x79a04f0> (NoMethodError) > C:/workspace/Guidewire/Common/lib/steps/header_steps.rb:10:in > `__instance_ > exec0' > C:/workspace/Guidewire/Common/lib/pages/GuidewirePage.rb:8:in > `initialize' > > (eval):2:in `new' > (eval):2:in `view_activity_pattern_page' > (eval):1:in `__instance_exec0' > ...... > > Is there a way to define a field with the name 'class'? > > Andy > > > -- Bret Pettichord CTO, WatirCraft LLC, www.watircraft.com Lead Developer, Watir, www.watir.com Blog, www.io.com/~wazmo/blog Twitter, www.twitter.com/bpettichord --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to [email protected] Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---
