So, im running into a silly issue trying to define a method inside my page class that will basically click on a link for me. I get an error that the method "div" isnt defined. I have tried defining in the page object, but then I get an error that the method "li" isnt defined., WHen I define "li" in the page class, Im still getting the same error on the "li" method. I have to go one element deeper to get it to work. Here is the action that works..When(/^I click on the Store tab$/) do@browser.div(:class => "nav-inner1").li(:class => "expanded store dropdown").a(:index, 0).clickI am trying to define that in a method inside my page class as follows..class MainPageinclude PageObjectpage_url "http://www.highlights.com/"def go_to_storediv(:class => "nav-inner1").li(:class => "expanded store dropdown").a(:index, 0).clickendendI have tried something like this...class MainPageinclude PageObjectpage_url "http://www.highlights.com/"div(:top_tab, :class => "nav-inner1")li(:store_tab, :class => "extended store dropdown")def go_to_storetop_tab.store_tab.a(:index, 0).clickendendBut I get an error that "store_tab" is undefined. So it seems to like top_tab, but not store_tab. As you can see in the first code snippet, i still have an "a" element to get through to be able to click.Any suggestions on how to get this simple method to work? Its prolly something simple that I am missing.
Also, if you are accessing the element, you have to use store_tab_element. store_tab will return the text inside that div, but store_tab_element returns the div element for you to perform actions on and whatnot.