Python Forum

Full Version: How to make use of this button with selenium?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Any one know how to get a usful ID from this:

//*[@id="main-content"]/div/div[2]/div/div[1]/div/div/div[12]/div/div[2]/div/header/div/span/button/div/div[1]

The ider is to klick the buttom like this

element=browser.find_element(By.ID,"main-content")
element.click()

Here is a bunch of other stuff derived from inspecting the element:

<div class="Flexbox__StyledFlexbox-sc-1ob4g1e-0 fRAfnA">Visa fler</div>
<div class="Flexbox__StyledFlexbox-sc-1ob4g1e-0 fRAfnA">Visa fler</div>

#main-content > div > div.CssGrid__RawCssGridItem-sc-bu5cxy-1.CssGrid___StyledRawCssGridItem-sc-bu5cxy-2.eKPANb.fOyzj > div > div.PageWrapper__Outer-sc-1ur2ylx-



I believe the first two line is Xphay and the other one im not sure.