Skip to main content



      Home
Home » Archived » Jubula » Locator Parameter Correct Syntax(What is the correct syntax for the Locator parameter?)
Locator Parameter Correct Syntax [message #1726127] Wed, 09 March 2016 16:46 Go to next message
Eclipse UserFriend
The Jubula Reference Manual documentation for (5.4.1.1) Click Locator, (5.4.2.4) Check Text by Locator, and (5.4.3.1) Wait for component (based on locator) says to use "css=..." for a CSS locator and "xpath=..." for an XPath locator.

I have found that both of the following example Locator parameter values seem to work equally well when using the above toolkit actions.

'xpath=//*[@id="topbar"]/div/a[6]'

'//*[@id="topbar"]/div/a[6]'


Is "xpath=" (or "css=") really needed when setting the LOCATOR parameter for the Click, Check Text, and Wait actions or is it merely an optional, self-documenting code formality?
Re: Locator Parameter Correct Syntax [message #1726633 is a reply to message #1726127] Tue, 15 March 2016 05:44 Go to previous message
Eclipse UserFriend
Hello Drew,
both your examples work equally, because (as far as I know) they are the same in Selenium. Jubula simply delegates these locator to Selenium which evaluates them. If you don't specify the type of the locator, the xpath is chosen by default. If you want to use css locators, you have to specify that. Some pros and cons of both types are explained here.

Best regards,
Sebastian
Previous Topic:SOLVED:Timeout received before confirming the posted event
Next Topic:Web Browser AUT Problem - Input Text and Replace Text Actions
Goto Forum:
  


Current Time: Mon Jul 07 11:18:00 EDT 2025

Powered by FUDForum. Page generated in 0.04769 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top