ruby - Cucumber/Webrat: follow link by CSS class? -


Is it possible to follow the link in the name of its class instead of ID, text or title? Given to me (Haha, Cucumber Insider?) Is the following HTML code:

   
  • I do not want to match the text because I have to care about translation values ​​in my tests
  • I have to see my buttons all the same style , Then I will use the CSS class.
  • I do not want to specify an ID for every single link, because some of them are fully identified through the container and the link class

Has anything remembered in the cucumber / Vibrat? Or do you have some advice to solve it better?

Thank you for your help and best regards,

who

edit: Getting an interesting discussion - is an open issue for now. Do you have any other ideas for this?

How did I do with cucumber here, hope it helps. What is the help of understanding #css in step definition? ID ("[^ \"]

"] *)" $ / Do | text, selector | must be viewed within a div ([^ \ "] *). # # {{Selector} "to check within the specified DIV ID # text for | content | if defined (? Prize :: rail :: matecars) content.should to (text) else hc = Webrat :: Matchers :: HasContent.new (text) must be hc.matches? (Content), hc.failure_message end end end

feature

  Scenarios Outline: Create the project when I click on & lt; title & gt; and I & lt; data_type & gt; Data_type and I click on "Create" Landscape within a Divine with: Search Neo More results | data_type | title | | books | one book title |  

Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -