-
-
Notifications
You must be signed in to change notification settings - Fork 751
How to iterate through all the items of I.grabTextFromAll #2910
RajeshVMVolvo
started this conversation in
General
-
For eg.
var vehicle = await I.grabTextFromAll(locator);
I can grab text of all elements , now I need to check whether 'car' exits or not. How can i do it ..pls suggest
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 1 reply
-
oh @RajeshVMVolvo the returned value vehicle
should be an array and you could basically do a loop through that array and assert what you need.
Beta Was this translation helpful? Give feedback.
All reactions
1 reply
-
yes i copied to another array & iterated.
var arrVehicle = [] ;
Array.prototype.push.apply(arrVehicle ,vehicle);
Then used array methods to itearate
Beta Was this translation helpful? Give feedback.
All reactions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment