There is only one line to use xpath in selenium

I want all the data on the page, but there is only one item taken down with xpath! Do I have a misunderstanding about xpath?

clipboard.png
girlname=driver.find_element_by_xpath("//div[@id="zoom"]/p")
print(type(girlname))
girlname=girlname.text
print(type(girlname))
print(girlname)

clipboard.png

this is the only one, which really puzzles me. I hope my seniors" advice, thank you

Nov.11,2021

girlname should be a collection that allows breakpoints to check whether the specific content is multiple, which is only valid for the first element when girlname.text directly. Here are the test cases for lxml


    <title>Title</title>
</head>
<body>
<div>
    

1

2

3

4

5

</div> </body> </html>""" html = etree.HTML(html) a = html.xpath("//div/p") for i in a: print(i.text)
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e47516-44c1c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e47516-44c1c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?