How to search for icon in table
Home › Forums › Ask Expert › How to search for icon in table
- This topic has 8 replies, 2 voices, and was last updated 2 years, 1 month ago by Sasha ZAP.
-
AuthorPosts
-
November 9, 2022 at 10:28 am #45836Marco MalziottiParticipant
Good morning
How can I verify that in the row (areaResultAvailab) corresponding to the result for a given “Car Group” there is at least one yellow icon with “1” (iconOne)?
I attach scripts, reports and data sources.
link (expires on 16/11/2022):
https://octospa-my.sharepoint.com/:f:/g/personal/m_malziotti_octotelematics_com/EspZagMeWdFMtpjche03vlEBIbUVlvkIi6dtT0vNZJfl_Q?e=RftUrr
Thank you.Marco Malziotti
November 9, 2022 at 2:39 pm #45841Sasha ZAPModeratorHello Marco.
It appears I cannot access the https://dmp-sysc-dev.octotelematics.com URL, I’m getting the message “403 Forbidden”.
I’ve updated the test with new commands which may help you, please check the attached “WS03-UC01_01-INSTOOL_RET_AVAILABILITY_ZAP Update.zap” file at the following shared drive (Download the entire appeared files):
https://drive.google.com/file/d/1sZ0wqUyZcfdHYfWnfPKN8nagu8yYWDr7/view?usp=sharing
In the testing script find the “ZAP Update” section (Lines #95-#101);
Also please check how I’ve updated the “iconOne” object and added a new “iconOneYellow” object.
Hope this helps.
Thanks,
ZAPTEST TeamNovember 9, 2022 at 8:41 pm #45844Marco MalziottiParticipantThanks Sasha
With a small modification (line 91) I don’t get the expected result.
Is it correct to “translate” the areaResultAvailab object up or down starting from the line found in the list (listCarGroup)?
I attach new script and report.
https://octospa-my.sharepoint.com/:f:/g/personal/m_malziotti_octotelematics_com/Eg1huMcB9ghOgWbrNgVo4icBzcatjxXgqmyfLwIRUfqwZg?e=uXsttXMarco Malziotti
November 10, 2022 at 12:07 am #45845Sasha ZAPModeratorHello Marco,
Basically you can manipulate the coordinates of any object in ZAPTEST Repository, but maybe you do not need to do such in your case:
I did some more changes to the script in the “ZAP Update” section (Line #95) , I’ve uploaded the new test to this shared drive:
https://drive.google.com/file/d/1w1HFgVbXm_NDGn5rWx6ZQXzcw8D9z7US/view?usp=sharing
Hope this helps.
Thanks,
ZAPTEST TeamNovember 10, 2022 at 10:06 am #45856Marco MalziottiParticipantThanks Sasha
Unfortunately raised same errors as the previous version (lines 97 and 98).
I remember that I am using the free version of ZapTest vers. 22.5.4.
I attach report at the following link:
https://octospa-my.sharepoint.com/:f:/g/personal/m_malziotti_octotelematics_com/EmRSbQp_wfRJiLGAuNWFebgBicsqUDX5bJpKWOTpwQlIKg?e=bBWYyJMarco Malziotti
November 10, 2022 at 10:35 am #45858Marco MalziottiParticipantAlso I notice that the new script doesn’t find the correct lblItemCarGroup (see file “warning-at-line-96.png”)!
ThanksMarco Malziotti
November 11, 2022 at 12:42 am #45860Sasha ZAPModeratorHello Marco,
Please place this code before my last update (Before Line #95):
Application(“SystemConsole”).View(“BNK-Availability&Price-NotAllZero”).Object(“lblItemCarGroup”).SetProperty “Text”, similarcarGroupDescr
Application(“SystemConsole”).View(“BNK-Availability&Price-NotAllZero”).Object(“lblItemCarGroup”).SetProperty “Appearance”, “2”
If Not(Application(“SystemConsole”).View(“BNK-Availability&Price-NotAllZero”).Object(“lblItemCarGroup”).Exist(500, False)) Then
Application(“SystemConsole”).View(“BNK-Availability&Price-NotAllZero”).Object(“lblItemCarGroup”).SetProperty “Appearance”, “1”
End IfThis code will ensure that if there are more then a one similar “lblItemCarGroup” objects the next steps will be handling the correct object.
If this will work then the Area object will also be set properly during runtime and therefore all other relatate objects will be recognized as well.P.S. In my original updated test, before adding the new code, please remove Line #95 (Application(“SystemConsole”).View(“BNK-Availability&Price-NotAllZero”).Object(“lblItemCarGroup”).SetProperty “Text”, carGroupDescr) because in the new added code there is already the same line of code and it is the prefered one.
Please advise.
Thanks,
ZAPTEST TeamNovember 14, 2022 at 11:02 am #46785Marco MalziottiParticipantThanks Sasha for your suggestions, everything works fine!
A last question:
the “iconGreen” icon (in “BNK-Availability & Price-AtleastOne” view) is not always on the first column. If you want to search for iconGreen in the whole area (areaResultAvailab), is it correct to indicate Scalability = None?
thank you again.last version in:
https://octospa-my.sharepoint.com/:f:/g/personal/m_malziotti_octotelematics_com/Emz83sonpiFEg04YrKu2sdkBrJZiE6gZ-9rOSnAZTH-SmQ?e=ULE5RJNovember 14, 2022 at 12:34 pm #46788Sasha ZAPModeratorHello Marco,
Basically the Scalability Object’s property is to enable the object recognition in different screen resolutions, but yes you can try this as well.
Also you can try the following code to search for the object with the number ‘1’ and then the rest of the already existing code will check the color of the object:
Application(“SystemConsole”).View(“BNK-Availability&Price-NotAllZero”).Object(“lblItemCarGroup”).Area(“areaResultAvailab”).Object(“iconOne”).SetProperty “Text”, “1”
Application(“SystemConsole”).View(“BNK-Availability&Price-NotAllZero”).Object(“lblItemCarGroup”).Area(“areaResultAvailab”).Object(“iconOne”).Exist
If the object will not be found you can change the object’s “Recognition Type” property.
Hope this helps.
Thanks,
ZAPTEST Team -
AuthorPosts
- You must be logged in to reply to this topic.