selenium

Trying to upload multiple files to a website using Python and Selenium but only the first file is picked up and not the others, any idea why?

百般思念 提交于 2021-02-15 07:37:12
问题 Theyre actually PGP files but i dont think that matters much Not sure whats wrong with my script, im using Selenium and Glob as the main source of uploading and file manipulation. I have all my files set for variable and i also used the send.keys accurately, not sure why its only picking up the first instance of every file and not all of them. For Example, the directory folder that all of these are pointing too might have 2 or 3 of the "ack" file. When i execute this code it will only pick up

Exception has occurred: TypeError 'WebElement' object is not subscriptable

ぐ巨炮叔叔 提交于 2021-02-15 07:35:17
问题 Hello guys I'm really a newbie to python and I just writing a piece of code that opens Whatsapp and you give it the person's name and the message then sends how many times you want. But when I start debugging the code it gives me this: Exception has occurred: TypeError 'WebElement' object is not subscriptable File "E:\Iliya\My Courses\Python\Projects\Whatsapp Robot\Whatsapp_Bot.py", line 15, in <module> msg = driver.find_element_by_class_name('_3FRCZ')[1] # ===================================

Exception has occurred: TypeError 'WebElement' object is not subscriptable

隐身守侯 提交于 2021-02-15 07:34:46
问题 Hello guys I'm really a newbie to python and I just writing a piece of code that opens Whatsapp and you give it the person's name and the message then sends how many times you want. But when I start debugging the code it gives me this: Exception has occurred: TypeError 'WebElement' object is not subscriptable File "E:\Iliya\My Courses\Python\Projects\Whatsapp Robot\Whatsapp_Bot.py", line 15, in <module> msg = driver.find_element_by_class_name('_3FRCZ')[1] # ===================================

How to locate the First name field within shadow-root (open) within the website https://www.virustotal.com using Selenium and Python

纵饮孤独 提交于 2021-02-15 07:34:30
问题 I am trying to automate process of sign up on virus total site and for this using selenium in python. But having a problem while getting element by id. i am stuck in this any help will be appreciated thanks. here is my code i am trying. from selenium import webdriver from selenium.webdriver.common.keys import Keys import time driver =webdriver.Chrome() driver.get('https://www.virustotal.com/gui/join-us') print(driver.title) search = driver.find_element_by_id("first_name") search.send_keys(

How to locate the First name field within shadow-root (open) within the website https://www.virustotal.com using Selenium and Python

不想你离开。 提交于 2021-02-15 07:34:21
问题 I am trying to automate process of sign up on virus total site and for this using selenium in python. But having a problem while getting element by id. i am stuck in this any help will be appreciated thanks. here is my code i am trying. from selenium import webdriver from selenium.webdriver.common.keys import Keys import time driver =webdriver.Chrome() driver.get('https://www.virustotal.com/gui/join-us') print(driver.title) search = driver.find_element_by_id("first_name") search.send_keys(

How to click a dropdown button within a svg tag using Selenium and Python

半腔热情 提交于 2021-02-15 07:33:49
问题 I have a website where i want to download an excel file. https://www.rivm.nl/media/smap/eenzaamheid.html I want to be able to click the download button and then click download xls. To click the first button i tried the following: WebDriverWait(driver, 10).until(EC.visibility_by_element_located(By.XPATH('//path[@d="M 11.6 5 L 11.6 17 M 7.4 12.6 L 11.6 17 L 15.799999999999999 12.6 M 3 19 L 3 21 L 21 21 L 21 19"]'))).click() and WebDriverWait(driver, 10).until(EC.visibility_by_element_located(By

How to handle 'Log in with Google' popup window using Selenium WebDriver

梦想的初衷 提交于 2021-02-15 07:29:52
问题 So i have a piece of code which works on fblogin pop-up window but the same piece of code doesn't work on googlelogin popup window. I dont know why. Website = https://accounts.trivago.com/login# Fb Sign Up code : driver.findElement(By.xpath(".//*[@id='authentication-login']/div/section[1]/div[3]/div/button[1]")).click(); String parentWindow = driver.getWindowHandle(); System.out.println("Parent Window ID is : " + parentWindow); Set<String> allWindow = driver.getWindowHandles(); int count =

Selenium not using Default Chrome Profile

北城以北 提交于 2021-02-15 07:03:09
问题 Selenium will not load my default Chrome Profile and I cannot figure out why. I have tried both Profile 1 and a Default profile with the same error (below). I have confirmed with Task Manager that all Chrome windows are shut down before running this code. Any thoughts? from selenium import webdriver from bs4 import BeautifulSoup import pandas as pd import numpy as np from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.chrome.options import Options import os os

Selenium not using Default Chrome Profile

人盡茶涼 提交于 2021-02-15 07:01:10
问题 Selenium will not load my default Chrome Profile and I cannot figure out why. I have tried both Profile 1 and a Default profile with the same error (below). I have confirmed with Task Manager that all Chrome windows are shut down before running this code. Any thoughts? from selenium import webdriver from bs4 import BeautifulSoup import pandas as pd import numpy as np from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.chrome.options import Options import os os

Selenium not using Default Chrome Profile

懵懂的女人 提交于 2021-02-15 07:01:06
问题 Selenium will not load my default Chrome Profile and I cannot figure out why. I have tried both Profile 1 and a Default profile with the same error (below). I have confirmed with Task Manager that all Chrome windows are shut down before running this code. Any thoughts? from selenium import webdriver from bs4 import BeautifulSoup import pandas as pd import numpy as np from webdriver_manager.chrome import ChromeDriverManager from selenium.webdriver.chrome.options import Options import os os