How to make use of this button with selenium? - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html) +--- Thread: How to make use of this button with selenium? (/thread-38257.html) |
How to make use of this button with selenium? - Nohah - Sep-22-2022 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. |