Hello,
I am currently experiencing an issue with a login script for a site that uses three fields.
First, you enter the username and password; then, the system asks for a store number starting with four digits (e.g., 0608).
In my script, I used the down arrow to select the correct store (0608 Albi Lescure), but unfortunately, Ui.Vision does not always register the selection correctly. As a result, when I click “Login,” the system returns an error.
Is there a more reliable method to select the correct store and ensure it is properly registered before clicking “Login”? Here is the code:
{
“Name”: “Macro5_Mutuelle_Connexion”,
“CreationDate”: “2025-12-29”,
“Commands”: [
{
“Command”: “store”,
“Target”: “20”,
“Value”: “!TIMEOUT_WAIT”,
“Description”: “Timeout global d’attente des éléments (20s)”
},
{
“Command”: “store”,
“Target”: “MEDIUM”,
“Value”: “!replayspeed”,
“Description”: “Vitesse moyenne pour stabiliser l’exécution”
},
{
“Command”: “selectWindow”,
“Target”: “tab=open”,
“Value”: “https://seeneo.grandvisionfrance.fr/TTT/Account/Login”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “id=AccessCode”,
“Value”: “”,
“Targets”: [
“id=AccessCode”,
“name=AccessCode”,
“xpath=//[@id=“AccessCode”]",
“xpath=//input[@id=‘AccessCode’]”,
“xpath=//div[2]/div/input”,
“css=#AccessCode”
],
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=AccessCode”,
“Value”: “lulu”,
“Targets”: [
“id=AccessCode”,
“name=AccessCode”,
"xpath=//[@id=“AccessCode”]”,
“xpath=//input[@id=‘AccessCode’]”,
“xpath=//div[2]/div/input”,
“css=#AccessCode”
],
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=ClonePd”,
“Value”: “pwdlulu”,
“Targets”: [
“id=ClonePd”,
“name=ClonePd”,
“xpath=//[@id=“ClonePd”]",
“xpath=//input[@id=‘ClonePd’]”,
“xpath=//div[2]/input”,
“css=#ClonePd”
],
“Description”: “”
},
{
“Command”: “click”,
“Target”: “id=SIIButtonConnect”,
“Value”: “”,
“Targets”: [
“id=SIIButtonConnect”,
"xpath=//[@id=“SIIButtonConnect”]”,
“xpath=//button[@id=‘SIIButtonConnect’]”,
“xpath=//button”,
“css=#SIIButtonConnect”
],
“Description”: “”
},
{
“Command”: “type”,
“Target”: “id=SiteCode_SIIAutocompleteCombobox”,
“Value”: “0503”,
“Targets”: [
“id=SiteCode_SIIAutocompleteCombobox”,
“name=SiteCode_SIIAutocompleteCombobox”,
“xpath=//[@id=“SiteCode_SIIAutocompleteCombobox”]",
“xpath=//input[@id=‘SiteCode_SIIAutocompleteCombobox’]”,
“xpath=//input”,
“css=#SiteCode_SIIAutocompleteCombobox”
],
“Description”: “”
},
{
“Command”: “click”,
“Target”: “id=ui-id-3”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “click”,
“Target”: “id=SIIButtonConnect”,
“Value”: “”,
“Targets”: [
“id=SIIButtonConnect”,
"xpath=//[@id=“SIIButtonConnect”]”,
“xpath=//button[@id=‘SIIButtonConnect’]”,
“xpath=//button”,
“css=#SIIButtonConnect”
],
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//[@id=“btn_collapseSidebar”]/i",
“Value”: “”,
“Targets”: [
"xpath=//[@id=“btn_collapseSidebar”]/i”,
“xpath=//div[2]/a/i”,
“css=#btn_collapseSidebar > i”
],
“Description”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//[@id=“SidebarBody”]/a/span",
“Value”: “”,
“Targets”: [
"xpath=//[@id=“SidebarBody”]/a/span”,
“xpath=//div[3]/a/span”,
“css=#SidebarBody > a:nth-child(1) > span”
],
“Description”: “”
}
]
}
Best regards
Hervé
