Hello everyone,
I am back with a full test case for this issue.
How to use it:
1 - Unzip the “PageTestCase.zip” file
2 - Open “Éditer DRAFT.PHYTO.2022.0015392 - Lot - TRACES NT.htm” with Firefox
3 - Add the following script to UI Vision
4 - Click “Play”
I also included 2 videos, one of the normal running of the test case (UI Vision isn’t showing, I just select the following macro and hit play) and one of the issue happening.
{
"Name": "TestMacroTrace",
"CreationDate": "2022-9-13",
"Commands": [
{
"Command": "store",
"Target": "nodisplay",
"Value": "!replayspeed",
"Description": ""
},
{
"Command": "store",
"Target": "5",
"Value": "!timeout_wait",
"Description": ""
},
{
"Command": "comment",
"Target": "Counters to loop on multiple articles",
"Value": "",
"Description": ""
},
{
"Command": "store",
"Target": "1",
"Value": "cpt",
"Description": ""
},
{
"Command": "store",
"Target": "2",
"Value": "uidCpt",
"Description": ""
},
{
"Command": "store",
"Target": "",
"Value": "articleCpt",
"Description": ""
},
{
"Command": "while_v2",
"Target": "${cpt} < 100",
"Value": "",
"Description": ""
},
{
"Command": "comment",
"Target": "Filling article informations",
"Value": "",
"Description": ""
},
{
"Command": "click",
"Target": "xpath=//*[@id=\"commoditiesBox\"]/div[2]/div[2]/section/ng-form[2]/div/div[2]/ul/li${articleCpt}/div/div[3]/div/div[2]/div/div/descriptor-column/ng-include/descriptor-column-taxon-selector/div/ul",
"Value": "",
"Targets": [
"xpath=//*[@id=\"commoditiesBox\"]/div[2]/div[2]/section/ng-form[2]/div/div[2]/ul/li[2]/div/div[3]/div/div[2]/div/div/descriptor-column/ng-include/descriptor-column-taxon-selector/div/ul",
"xpath=//li[2]/div/div[3]/div/div[2]/div/div/descriptor-column/ng-include/descriptor-column-taxon-selector/div/ul",
"css=#commoditiesBox > div.panel-body > div:nth-child(2) > section > ng-form.ng-valid-phyto-edit-consignment-identification-required.ng-valid-editable.ng-valid-min.ng-valid-max.ng-valid-pattern.ng-valid-parse.ng-dirty.ng-valid-float.ng-valid.ng-valid-required > div > div.descriptorRowForms > ul > li:nth-child(2) > div > div.descriptorRowColumnsContainer > div > div.col-md-2.descriptorColumn.TAXON_ID > div > div > descriptor-column > ng-include > descriptor-column-taxon-selector > div > ul"
],
"Description": ""
},
{
"Command": "click",
"Target": "id=uid-${uidCpt}-search",
"Value": "",
"Description": ""
},
{
"Command": "type",
"Target": "id=uid-${uidCpt}-search",
"Value": "e",
"Description": ""
},
{
"Command": "waitForElementVisible",
"Target": "xpath=//*[@id=\"uid-${uidCpt}-search\"]/ancestor::div/ul/li/a/span",
"Value": "",
"Description": ""
},
{
"Command": "click",
"Target": "xpath=//*[@id=\"uid-${uidCpt}-search\"]/ancestor::div/ul/li/a/span",
"Value": "",
"Targets": [
"xpath=//*[@id=\"typeahead-4747-6422-option-0\"]/a/span",
"xpath=//descriptor-column-taxon-selector/div/div/div/ul/li/a/span",
"css=#typeahead-4747-6422-option-0 > a > span.label.label-success"
],
"Description": ""
},
{
"Command": "click",
"Target": "xpath=//*[@id=\"commoditiesBox\"]/div[2]/div[2]/section/ng-form[2]/div/div[2]/ul/li${articleCpt}/div/div[3]/div/div[4]/div/div/descriptor-column/ng-include/descriptor-column-quantity/div/div/input",
"Value": "",
"Targets": [
"xpath=//*[@id=\"commoditiesBox\"]/div[2]/div[2]/section/ng-form[2]/div/div[2]/ul/li/div/div[3]/div/div[4]/div/div/descriptor-column/ng-include/descriptor-column-quantity/div/div/input",
"xpath=//input[@type='number']",
"xpath=//descriptor-column-quantity/div/div/input",
"css=#commoditiesBox > div.panel-body > div:nth-child(2) > section > ng-form.ng-pristine.ng-invalid.ng-valid-phyto-edit-consignment-identification-required.ng-valid-editable.ng-valid-min.ng-valid-max.ng-invalid-required.ng-valid-pattern.ng-valid-parse > div > div.descriptorRowForms > ul > li > div > div.descriptorRowColumnsContainer > div > div.col-md-2.descriptorColumn.NET_WEIGHT > div > div > descriptor-column > ng-include > descriptor-column-quantity > div > div > input"
],
"Description": ""
},
{
"Command": "type",
"Target": "xpath=//*[@id=\"commoditiesBox\"]/div[2]/div[2]/section/ng-form[2]/div/div[2]/ul/li${articleCpt}/div/div[3]/div/div[4]/div/div/descriptor-column/ng-include/descriptor-column-quantity/div/div/input",
"Value": "12",
"Targets": [
"xpath=//*[@id=\"commoditiesBox\"]/div[2]/div[2]/section/ng-form[2]/div/div[2]/ul/li/div/div[3]/div/div[4]/div/div/descriptor-column/ng-include/descriptor-column-quantity/div/div/input",
"xpath=//input[@type='number']",
"xpath=//descriptor-column-quantity/div/div/input",
"css=#commoditiesBox > div.panel-body > div:nth-child(2) > section > ng-form.ng-pristine.ng-invalid.ng-valid-phyto-edit-consignment-identification-required.ng-valid-editable.ng-valid-min.ng-valid-max.ng-invalid-required.ng-valid-pattern.ng-valid-parse > div > div.descriptorRowForms > ul > li > div > div.descriptorRowColumnsContainer > div > div.col-md-2.descriptorColumn.NET_WEIGHT > div > div > descriptor-column > ng-include > descriptor-column-quantity > div > div > input"
],
"Description": ""
},
{
"Command": "type",
"Target": "xpath=//*[@id=\"commoditiesBox\"]/div[2]/div[2]/section/ng-form[2]/div/div[2]/ul/li${articleCpt}/div/div[3]/div/div[5]/div/div/descriptor-column/ng-include/descriptor-column-quantity/div/div/input",
"Value": "30",
"Targets": [
"xpath=//*[@id=\"commoditiesBox\"]/div[2]/div[2]/section/ng-form[2]/div/div[2]/ul/li/div/div[3]/div/div[5]/div/div/descriptor-column/ng-include/descriptor-column-quantity/div/div/input",
"xpath=//div[5]/div/div/descriptor-column/ng-include/descriptor-column-quantity/div/div/input",
"css=#commoditiesBox > div.panel-body > div:nth-child(2) > section > ng-form.ng-invalid.ng-valid-phyto-edit-consignment-identification-required.ng-valid-editable.ng-valid-min.ng-valid-max.ng-invalid-required.ng-valid-pattern.ng-valid-parse.ng-dirty.ng-valid-float > div > div.descriptorRowForms > ul > li > div > div.descriptorRowColumnsContainer > div > div.col-md-2.descriptorColumn.PACKAGE_COUNT > div > div > descriptor-column > ng-include > descriptor-column-quantity > div > div > input"
],
"Description": ""
},
{
"Command": "comment",
"Target": "This is where the bug occurs, the type command repeats itself \"Web page connection issue. Retrying last command.\"",
"Value": "",
"Description": ""
},
{
"Command": "type",
"Target": "xpath=//*[@id=\"commoditiesBox\"]/div[2]/div[2]/section/ng-form[2]/div/div[2]/ul/li${articleCpt}/div/div[3]/div/div[12]/div/div/descriptor-column/ng-include/descriptor-column-string/div/div/input",
"Value": "12548896 - EXPORT POUR LES PETITS CANARDS BIEN DODUS",
"Targets": [
"xpath=//*[@id=\"commoditiesBox\"]/div[2]/div[2]/section/ng-form[2]/div/div[2]/ul/li/div/div[3]/div/div[12]/div/div/descriptor-column/ng-include/descriptor-column-string/div/div/input",
"xpath=//descriptor-column-string/div/div/input",
"css=#commoditiesBox > div.panel-body > div:nth-child(2) > section > ng-form.ng-valid-phyto-edit-consignment-identification-required.ng-valid-editable.ng-valid-min.ng-valid-max.ng-valid-pattern.ng-valid-parse.ng-dirty.ng-valid-float.ng-valid.ng-valid-required > div > div.descriptorRowForms > ul > li > div > div.descriptorRowColumnsContainer > div > div.col-md-2.descriptorColumn.DISTINGUISH_MARK > div > div > descriptor-column > ng-include > descriptor-column-string > div > div > input"
],
"Description": ""
},
{
"Command": "comment",
"Target": "BUG",
"Value": "",
"Description": ""
},
{
"Command": "comment",
"Target": "Counters update for the next loop",
"Value": "",
"Description": ""
},
{
"Command": "executeScript_Sandbox",
"Target": "return Number(${cpt}) +1;",
"Value": "cpt",
"Description": ""
},
{
"Command": "executeScript_Sandbox",
"Target": "return Number(${uidCpt}) +3;",
"Value": "uidCpt",
"Description": ""
},
{
"Command": "executeScript_Sandbox",
"Target": "return \"[\" + ${cpt} + \"]\";",
"Value": "articleCpt",
"Description": ""
},
{
"Command": "click",
"Target": "xpath=//*[@id=\"commoditiesBox\"]/div[2]/div[2]/section/ng-form/div/div/div/div[2]/div/div/button",
"Value": "",
"Targets": [
"xpath=//*[@id=\"commoditiesBox\"]/div[2]/div[2]/section/ng-form/div/div/div/div[2]/div/div/button",
"xpath=//ng-form/div/div/div/div[2]/div/div/button",
"css=#commoditiesBox > div.panel-body > div:nth-child(2) > section > ng-form.ng-pristine.ng-valid.ng-valid-phyto-edit-consignment-commodities-required > div > div > div > div.col-md-5 > div.pull-right > div > button:nth-child(1)"
],
"Description": "Add article"
},
{
"Command": "end",
"Target": "",
"Value": "",
"Description": ""
}
]
}
Thank you for your time
PageTestCase.zip (807.9 KB)
TestCaseRunning.zip (19.8 MB)
IssueHappening.zip (15.4 MB)