css-selectors

How do I find the images from the GIF section on Tenor via Selenium + Python?

How do I find the images from the GIF section on Tenor via Selenium + Python? Question: I want to find GIFs on Tenor, and download them. Example: URL : https://tenor.com/search/dance-gifs I want to download the GIFs section which seem to have this HTML code: <div class="Gif "><img src="https://media.tenor.com/Lbrr3HR3CnkAAAAM/snoop-dogg-rap.gif" width="290" height="460.0454545454545" alt="Snoop Dogg Rap GIF …

Total answers: 1

Selenium: find elements by classname returns only one item instead of all

Selenium: find elements by classname returns only one item instead of all Question: The code below sometimes returns one (1) element, sometimes all, and sometimes none. For it to work for my application I need it to return all the matching elements in the page Code trials: from selenium import webdriver from selenium.webdriver.common.by import By …

Total answers: 1

Selenium – how to click on the button

Selenium – how to click on the button Question: I am looking for the way to click on the button which is located in HTML this way: <button class="MuiButton-root MuiButton-contained MuiButton-containedPrimary MuiButton-sizeMedium MuiButton-containedSizeMedium MuiButtonBase-root css-1rs4rtx" tabindex="0" type="button"> Zaloguj siÄ™<span class="MuiTouchRipple-root css-w0pj6f"></span></button> I tried a few ways to find this without any success. from selenium import …

Total answers: 2

Selenium unable to locate button

Selenium unable to locate button Question: I am trying to click a button on a website in Python using Selenium. The html looks like this: <a class="btn btn-default btn-lg primary-light-blue-btn" onclick="createReport()">Create report</a> I have tried using: l = driver.find_element(By.XPATH, "//button[@class=’btn btn-default btn-lg primary-light-blue-btn’]") But I get the error: NoSuchElementException: no such element: Unable to locate …

Total answers: 2

Selenium unable to locate though using expected conditions

Selenium unable to locate though using expected conditions Question: Selenium is unable to locate the element by its xpath even though I’m using expected conditions to wait 3 seconds for element visibility. I’m trying to interact with the search bar, send a string, and press enter. My code is below: def search_bar(self, search: str, xpath: …

Total answers: 1

Unable to click on element within iframe using Selenium Python

Unable to click on element within iframe using Selenium Python Question: I’m trying to make bot click on X to close a popup but nothing happens, I tried using different elements to target the popup close button but nothing seems to work. URL of the website is: https://vb.rebelbetting.com/login?r=%2f Code trials: from selenium import webdriver from …

Total answers: 1

How to choose a dropdown menu option in selenium python?

How to choose an option from a non select dropdown menu in selenium python? Question: I want to click dropdown menu button in this html code. <div id="menu-button-:r1p:" aria-expanded="true" aria-haspopup="menu" aria-controls="menu-list-:r1p:" class="chakra-menu__menu-button css-6iqp1a" data-active=""> <span class="css-xl71ch"> <div class="css-70qvj9">Aa </div> </span> </div> <div class="css-r6z5ec" style="visibility: hidden; position: absolute; min-width: max-content; inset: 0px auto auto 0px;"> <div …

Total answers: 1

How to locate element inside IFRAME with Selenium Python?

How to locate element inside IFRAME with Selenium Python? Question: I can’t find the search button on the screen below: I noticed that it is inside an IFRAME in the HTML I used some methods to click the button that didn’t work, it always returns the error message that the element is not found with …

Total answers: 1

Selenium not able to find all elements in HTML page

Selenium not able to find all elements in HTML page Question: I am doing web scraping to the real estate portal <www.immobiliare.it> Specifically I am retrieving some information from the search page, which contains 25 properties per page. I have managed to retrieved almost everything but I am having trouble to retrieve the src of …

Total answers: 1