Category : selenium

I am having problems getting data from a element using Selenium with the line: bets = driver.find_elements_by_class_name(‘sgl-ParticipantFixtureLink gl-Market_General-cn1 ‘) I can get the data by using XPath, but getting all the values since they have the same class name would be more efficient. Since I am pretty new to HTML, Python, JavaScript etc, I was ..

Read more

In the 1st image the red call button after being clicked displays a phone number which is highlighted in yellow in the 2nd picture which needs to be scraped def dealer_info(): for link in links: print(‘link: ‘, link) driver.get(link) div = driver.find_element_by_class_name(‘seller-details-name’) dealer_name = div.find_element_by_tag_name(‘h3’).text print(dealer_name) button = WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, ‘/html/body/div[3]/div[2]/div[1]/div/div[2]/div[1]/div[1]/div[2]/div[1]/a[1]’))) button.click() phone_no = driver.find_element_by_class_name(‘showphone’).text ..

Read more

driver.execute_script("paginateGayrimenkul(2);") this code should be taking the webdriver to the second page of the website. But when I search for elements I still get the elements of page one The paginateGayrimenkul(2); command works on chrome’s console so I know that’s not the issue My question is: How can I get the elements of the new ..

Read more

I’m trying to create a program to google search using selenium based on this answer, so far the code looks like this const { Builder, By, Key, until } = require(‘selenium-webdriver’); const driver = new Builder().forBrowser("firefox").build(); (async () => { await driver.get(`https://www.google.com`); var el = await driver.findElement(By.name(‘q’)); await driver.wait(until.elementIsVisible(el),1000); await el.sendKeys(‘selenium’); var el = await ..

Read more