1) When the "Exists" method is inserted against against a control such as the above item, the full locator is entered into the Object's locator property within the test steps properties. As shown in the image below:
2) As you can see from the image above, there are two properties named Locator, one under the Object heading, the other under the Action heading.
3) We will first modify the Locator under the Object heading, this is considered the parent locator. From the full locator we can see that the login buttons parent is the browser window.
We can thus cut "//INPUT[@id='login-form:login']" from the locator value.
The remaining value will represent the parent locator i.e "/BrowserApplication//BrowserWindow"
4) Next we place the cursor inside the textfield for the Locator property under the Action heading, this is considered the child locator.
Perform a right a right click and select paste from the menu
The value should now read "//INPUT[@id='login-form:login']"
The properties should now look similar to the image below:-
5) When you run the script the expected "True or False" value will now be returned from the "Exists" method to the reserved variable "st_LastReturnValue".