Challenge 05 (December 21) | What is the expected output if there is no WebElement matching the name “li1”?

unnamed (14)

#LambdaTestCodingChallenge #CodeFestDec2021

1 Like

D. Because Size of List of Web elements in this case is zero, and it means we’re trying to get the first element of that list. So it throws IndexOutOfBoundsException

4 Likes

arrayaoutofboundexception as we are trying to access 0th element of an empty list. findelements returns an empty list when element does not exist

4 Likes