[BUG] `By.CSS_SELECTOR` wrong number of elements
milahu opened this issue · comments
Selenium-Driverless/src/selenium_driverless/types/deserialize.py
Lines 560 to 566 in 5f56548
in the class_name == 'NodeList'
case
description == "NodeList(15)"
so description[-2] == 5
so driver.find_elements
only returns 5 of 15 elements
in the _type == 'htmlcollection'
case
description == "HTMLCollection(15)"
...
fix
- int(description[-2])
+ int(description[len(class_name)+1:-1])
similar #149
Uhh you're right! Thanks a lot
I've as well considered using javascript for performance instead. However, returning a list then might not return some details at depth=1
=>element.
hmm? a quickfix would be Array.from(x.querySelector(y))
0ae3a96#diff-af5cc8da593dfc414f4e600521af3a40b1d04d82b4a2c6d6ce147a1f3395213bL563-R567
let's hope I didn't mess up the indexes haha