1

is there any LeanFT method that returns the number of an element? I wish to use it instead of the exists() method. Something like the following:

if(PageX.Node.closeTabButton.count() > 0)
   {
    ...
    Treatement
    ...
   }

I wanted to check if a type of bouton (Close Tab Button) exists on the page before starting a treatment, so I put that as a condition:

if(PageX.Node.closeTabButton.exists())
   {
    ...
    Treatement
    ...
   }

the exists() method seems not work because there is more than one closeTabButton elements on the page, that's why I'm looking for an alternative solution.

Dmitry Bychenko
  • 180,369
  • 20
  • 160
  • 215
Badreddine
  • 11
  • 3

1 Answers1

0

Instead of using a single object, you should use the parent's FindChildren with the description, then you can see how many elements exist.

Motti
  • 110,860
  • 49
  • 189
  • 262