testing - perl-selenium: like() or $sel->like()? -


Pearl-Selenium also provides standard methods of testing: more like (), like (), is (), Etc., also as object methods, such as $ sel- & gt; E.g. () .

($ sel is Selenium Pearl Object)

Should these object methods be used at all? Which is the favorite?

I'm wondering because such as () and $ sel- & gt; It seems that behaves differently on the place here but I think the text is actually found on the page. Like

  ($ found, qr / $ text /, "found '$ text' on page"); # FINE # does not work, error: "I do not like much like a Reggae." $ Sel- & gt; ($ Found, qr / $ text /, "found 'on $ text' page") "  

so it looks like () method is better for $ SL-> gt ; Like ()?

It seems that it does not offer itself as Method gives us a variety of methods like title_like or text_like like

  (like $ found, qr / $ text / , '$' Text '' on the page ");   

or

  $ sel- & gt;   

Edit: in the text_like ('id', qr / $ text /, '' / Code> The method is available, but when it is left out, it looks like:

  sub (my $ TB = 'test :: more' -> builder; return $ TB-> AS (@_);}   

This means that calls as $ sel-> gt; such (...) By calling you an additional parameter ( $ sel ) to call the method. This method is test :: builder succession Remnant and possibly it can not be used directly.

Comments