Home>

I'm trying to find a list of all the elements on the page, but web_driver.find_elements returns only one element, although there are about a dozen of them on the page that fall under the link_model template

srch_link_list= web_driver.find_elements (
                By.XPATH, f "//* [@ class= 'summary'] /p /a [contains (text (), '{link_model}')]")
            logger.debug (f'srch_link_list= {srch_link_list} ')

Result:

Search for all links to bugs that meet the conditions
08: 16: 43.138 | DEBUG | __main __: search_link: 402 -srch_link_list= [<
selenium.webdriver.remote.webelement.WebElement (session= "71e40208840934aa98d6f516135da83c", element= "cf5b4ef3-f619-4428-b465-3424c8d437a6") >
]
08: 16: 43.139 | DEBUG | __main __: search_link: 406 -*** search_link *** return [<
selenium.webdriver.remote.webelement.WebElement (session= "71e40208840934aa98d6f516135da83c", element= "cf5b4ef3-f619-4428-b465-3424c8d437a6") >
]

find_elements_by_xpath produces the same result.

Tell me, pozhpluysta, why or what am I doing wrong?

Please clarify your specific problem or provide more detailed information on what exactly you need. As it stands, it is difficult to understand exactly what you are asking.

Дух сообщества2021-11-25 05:41:10

Can I link to the resource?

ProgerOffline2021-11-25 07:12:55