Relative Content

Tag Archive for pythonselenium-webdriverselenium-chromedriver

How do I get selenium to consistently find and use an element when creating a Kahoot quiz?

I’m creating a auto type answer Kahoot quiz from a spreadsheet using selenium. Here is an excerpt of some of my code below, and a excerpt to some of the table I’m using. Everything else should work, however on lines 87 to 91 it can’t consistently create a new type answer question and on lines 98 to 101 it can’t consistently type out the questions and answers. When something goes wrong with either it’s because the web element couldn’t be found, which confuses me because the code works properly sometimes.

How can I change the answer type to “Type Answer” on Kahoot?

import time import pandas as pd from selenium import webdriver from selenium.webdriver.common.by import By from selenium.webdriver.common.keys import Keys from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC #Type in your email or username email = ’email’ password = ‘password’ #set up the webdriver driver = webdriver.Chrome() #go to kahoot login driver.get(‘https://create.kahoot.it/auth/login’) #type kahoot account […]

Python Selenium – Google has stopped working popup

Hi I am trying to do web scraping and code processing successfully, but later after some time(~after 5-6 hours) I am getting error (pop-up) as “Google chrome has stopped working”.
Below are chrome_options that I am using

Python Selenium – Google has stopped workinh popup

Hi I am trying to do web scrapping and code processing successfully, but later after some time(~after 5-6 hours) i am getting error (pop-up) as “Google chrome has stopped working”.
Below are chrome_options that i am using

Selenium python save screenshot on the Debian 11

import math from selenium import webdriver from fpdf import FPDF from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.chrome.service import Service from selenium.webdriver.common.by import By url= sys.argv[1] options = webdriver.ChromeOptions() options.add_argument(‘–headless’) options.add_argument(‘–no-sandbox’) options.add_argument(‘–disable-dev-shm-usage’) options.add_argument(‘–incognito’) options.add_argument(‘–start-maximized’) driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options) driver.get(url) width = driver.execute_script(“return Math.max( document.body.scrollWidth, document.body.offsetWidth, document.documentElement.clientWidth, document.documentElement.scrollWidth, document.documentElement.offsetWidth );”) height = driver.execute_script(“return Math.max( document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, […]