python selenium

운영자 | 기사입력 2024/08/13 [03:42]
>
필자의 다른기사 보기 인쇄하기 메일로 보내기 글자 크게 글자 작게
python selenium
 
운영자   기사입력  2024/08/13 [03:42]
 from selenium import webdriver

from selenium.webdriver.chrome.service import Service as ChromeService

from webdriver_manager.chrome import ChromeDriverManager

import time

from selenium.webdriver.support.ui import WebDriverWait

from selenium.webdriver.common.by import By

from selenium.webdriver.support import expected_conditions as EC

 

service = ChromeService(executable_path=ChromeDriverManager().install())

driver = webdriver.Chrome(service=service) 

 

#driver.imlicitly_wait(3)

url = 'https://www.naver.com

driver.get(url)    

time.sleep(10)




=================================================================


import csv

import os

import pickle

import random

import threading

import time

import tkinter

from tkinter import *

from tkinter import filedialog

from typing import List

import pyperclip

import requests

from selenium.webdriver.chrome.webdriver import WebDriver

from selenium.webdriver.common.action_chains import ActionChains

from selenium.webdriver.common.by import By

from selenium.webdriver.common.keys import Keys

from selenium.webdriver.remote.webelement import WebElement


from selenium import webdriver

from selenium.webdriver.chrome.service import Service as ChromeService

from webdriver_manager.chrome import ChromeDriverManager

from selenium.webdriver.support.ui import WebDriverWait

from selenium.webdriver.common.by import By

from selenium.webdriver.support import expected_conditions as EC


service = ChromeService(executable_path=ChromeDriverManager().install())

driver = webdriver.Chrome(service=service) 


#driver.imlicitly_wait(3)

url = 'https://x.com/i/flow/login'

driver.get(url)    

driver.implicitly_wait(10) 

#time.sleep(5)

input_field = driver.find_element(By.XPATH, '//*[@id="layers"]/div[2]/div/div/div/div/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/div[4]/label/div/div[2]/div/input') 

input_field.send_keys("alwaysb@hotmail.com")  # Enter the desired text into the input field


element2 = driver.find_element(By.XPATH, '//*[@id="layers"]/div[2]/div/div/div/div/div/div[2]/div[2]/div/div/div[2]/div[2]/div/div/div/button[2]/div/span/span')

driver.execute_script("arguments[0].click();", element2)

##############################

input_field = driver.find_element(By.XPATH, '//*[@id="layers"]/div[2]/div/div/div/div/div/div[2]/div[2]/div/div/div[2]/div[2]/div[1]/div/div[2]/label/div/div[2]/div/input') 

input_field.send_keys("alwaysb19") 

element2 = driver.find_element(By.XPATH, '//*[@id="layers"]/div[2]/div/div/div/div/div/div[2]/div[2]/div/div/div[2]/div[2]/div[2]/div/div/div/button/div/span/span')

driver.execute_script("arguments[0].click();", element2)

time.sleep(2)

################################

input_field = driver.find_element(By.XPATH, '//*[@id="layers"]/div[2]/div/div/div/div/div/div[2]/div[2]/div/div/div[2]/div[2]/div[1]/div/div/div[3]/div/label/div/div[2]/div[1]/input') 

input_field.send_keys("wingzero1948") 


element3 = driver.find_element(By.XPATH, '//*[@id="layers"]/div[2]/div/div/div/div/div/div[2]/div[2]/div/div/div[2]/div[2]/div[2]/div/div[1]/div/div/button/div/span/span')

driver.execute_script("arguments[0].click();", element3)



time.sleep(60)

==================================================================================
트위터 트위터 페이스북 페이스북 카카오톡 카카오톡
기사입력: 2024/08/13 [03:42]  최종편집: ⓒ iwav