JQuery selectors are used to automate logins with the Browser Credential resources.
Use this cheat-sheet to identify elements on the page.
Identifying Inputs (username / password)
Does the element have a unique id like:
If so to identify the element in the Browser Credential resource use:
Next if there is no id, look for a name:
<input name="somename" >
If the name is unique in the page you can use:
Identifying Actions (Login button)
Actions are typically buttons but could be links as well. Use the same method as above they will typically have an id or a name.
Links using the <a> tag might not have a name of an id. You can identify this uniquely if it has a URL in the href attribute
So would use
You can also identify elements by their class, these tend not to be unique. For example
If there is only one use of logon class in the page you can use:
Or if the use of class is unique to the tag you can use
Identifying Errors and Matches
When you match a URL you may also need to specify additional match selectors, especially if the page is not a dedicated logon page. Errors need to be captured so that the logon page does not go into an infinite loop of submitting the credentials. So capturing changes on the page is essential
In addition to the above strategies you can also look for specific text in an element
<div>This is a logon form</div>
To select this you can use
div:contains('This is a logon form')