Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How to iterate through all the items of I.grabTextFromAll #2910

RajeshVMVolvo started this conversation in General
Discussion options

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

You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

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.

You must be logged in to vote
1 reply
Comment options

yes i copied to another array & iterated.
var arrVehicle = [] ;
Array.prototype.push.apply(arrVehicle ,vehicle);
Then used array methods to itearate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /