FindAll Method Not Returning Anything
This is hopefully a straightforward solution for someone out there with far more experience than I. My application has rows inside a parent element. Each row is segmented so it also appears to have columns. I need to get all the "add user" buttons that are in a 'column' together in one array and loop through it.
Roughly
<div>
<row 1> <stuff I dont need> <button I do need>
<row 2> <stuff I dont need> <button I do need>
<row 3> <stuff I dont need> <button I do need>
</div>
I believe the FindAll or FindAllChildren is the correct route but I am getting empty arrays returned. The buttons all have the same text "Add User" and are SPAN elements (not actually a button element). The buttons are all in the rows as I described and are contained in one parent DIV that wraps around all the rows. (Unfortunately not the column).
This is close to what I have without sharing exact code:
let column = page.FindElement("//div[contains(@class, 'random-css')]");
Log.Message(column.FindAllChildren("SPAN", "Add User", 300000))
>> returns null
Thank youHello vladd1,
FindElements returns an array of objects you can loop though.
https://support.smartbear.com/testcomplete/docs/reference/test-objects/members/page/findelements-method-page-object.html
... If you find my posts helpful drop me a like! 👍 Be sure to mark or post the solution to help others out and/or to credit the one who helped you. 😎