So I am new to using Selenium with Python. I would like to access a xpath on a specific website.
To access this website one must first log in with an account, so my problem is not really reproduceable by outsiders.

I read something about switching to iframe before trying to reach certain xpaths but this website uses something else instead of iframe.

I want to access the xpath of this search field, on the right side we can see this ‘shelly’ thing (see first picture).
enter image description here

In the second picture we can see the xpath of the element I want to reach, but when I try to use it with Python/Selenium it won’t get recognized…

I tried two xpaths (both won’t work):


I also tried something like this:
driver.switch_to.frame(driver.find_element_by_class_name("shelly-app__page")) driver.switch_to.frame(driver.find_element_by_tag_name("shelly-app")) driver.switch_to.frame(1)

piece of code:

name =driver.find_element(‘xpath’,’//*[@id=”puik-search-bar”]’)

The log in page to access this search bar can be automated with the standard selenium functions
but after the log in page (the page with the search bar) the standard functions won’t work

Thanks in advance

New contributor

fridgekido is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.