728x90 ๐จ๐ผ๐ป๊ฐ๋ฐ/์ ๋ ๋์38 ์ ๋ ๋์ - ๋ค์ด๋ฒ๊ฐ ์ ๋ ๋์์ ํ์งํ๋ ๋ฐฉ๋ฒ https://economytrendstory.com/1174 ํฌ๋กฌ ์๋ํ ํด selenium์ ํ์งํ๋ ๋ฒ 4๊ฐ์ง selenium์ ํ์ง๊ฐ ๋ถ๊ฐ๋ฅ ํ ๊น์?์ด๋ค ๋ฐฉ์์ผ๋ก ์ ๋ ๋์์ ํ์ง ํ ์ ์์์ง ํ์ธํด๋ณด์์ต๋๋ค. navigator.webdriver ํ์ธClient hints, navigator.userAgentData ํ์ธchromedriver ํ์ง๋ธ๋ผ์ฐ์ ์ง๋ฌธ(browser fingerprin economytrendstory.com https://economytrendstory.com/1171 ๋ค์ด๋ฒ๋ ์ ๋ง๋ก ๋ง์ฐ์ค ์ขํ๊น์ง ์์งํด ๊ฐ๊น? ๋ง์ผํฐ์ ์ด์ผ๊ธฐํ๋ฉด ์ด๋ฐ ์ด์ผ๊ธฐ๋ฅผ ๋ค์ด๋ณด์ ์ ์์ผ์ ๊ฐ์?"๋ค์ด๋ฒ๋ ๋ง์ฐ์ค ํด๋ฆญ ์ขํ๊น์ง ์์งํด๊ฐ์"์ด ๋ง์ ๋ฏฟ์ผ์๋์? ์ ๋ "์นด๋๋ผ"๋ฅผ ๋ฏฟ์ง ์์ต๋๋ค. "์ฌ.. 2022. 9. 27. ์ ๋ ๋์ - Element is not clickable at point ํด๊ฒฐ ๋ฐฉ๋ฒ ์์ธ ๋ธ๋ผ์ฐ์ ๊ฐ ํด๋ฆญํด์ผ ํ๋ ์์๋ฅผ ๋ณด์ด์ง ์๋ ๊ณณ์ ์๊ธฐ ๋๋ฌธ์(์คํฌ๋กค์ด ๊ธธ๋ค๋๊ฐ ๋ฑ) ๋ฐ์ํ๋ ์์ธ ํด๊ฒฐ ๋ฐฉ๋ฒ from selenium.webdriver.common.action_chains import ActionChains element = driver.find_element_by_id("my-id") actions = ActionChains(driver) actions.move_to_element(element).perform() # actions.move_to_element(element).click().perform() # Click ๋ธ๋ผ์ฐ์ ๋ฅผ ์กฐ์ํ๋ ActionsChains์ผ๋ก ๋ธ๋ผ์ฐ์ ๊ฐ ์์๊ฐ ์๋ ๊ณณ์ผ๋ก ์ด๋์ํฌ ์ ์๋ค. ์ฐธ๊ณ : https://stackoverflow.com/que.. 2022. 8. 31. ์ ๋ ๋์ - ๋ง์ฐ์ค๋ฅผ ๋ ์ธ๊ฐ์ ์ผ๋ก ์กฐ์ํ๊ธฐ(Action ํด๋์ค) https://testmanager.tistory.com/m/119 Selenium Webdriver์์ Action Class๋ฅผ ์ฌ์ฉํ๋ ํค๋ณด๋ ๋ฐ ๋ง์ฐ์ค ์ด๋ฒคํธ ํค๋ณด๋ ๋ฐ ๋ง์ฐ์ค ์ด๋ฒคํธ ์ฒ๋ฆฌ ํน์ ํค๋ณด๋ ๋ฐ ๋ง์ฐ์ค ์ด๋ฒคํธ ์ฒ๋ฆฌ๋ ๊ณ ๊ธ ์ฌ์ฉ์ ์ํธ ์์ฉ API๋ฅผ ์ฌ์ฉํ์ฌ ์ํ ๋ฉ๋๋ค . ์ด ์ด๋ฒคํธ๋ฅผ ์คํํ ๋ ํ์ํ ์กฐ์น ๋ฐ ์กฐ์น ํด๋์ค๊ฐ ๋ค์ด ์ testmanager.tistory.com 2022. 7. 26. ์ ๋ ๋์ - chromedriver ์๋ ์ ๋ฐ์ดํธ ๋ฐ ์ค์น pip install chromedriver_autoinstaller from selenium import webdriver import chromedriver_autoinstaller def driverAutoInstall(): chromedriver_autoinstaller.install() driver = webdriver.Chrome() return driver driver = driverAutoInstall() driver.get('http://google.com') ์ถ์ฒ: https://dev-guardy.tistory.com/78 [Python] chromedriver selenium ์๋์ค์น [์ ๋ ๋์, ํฌ๋กฌ๋๋ผ์ด๋ฒ] Python , chromedrvier, Selenium, ์ ๋ ๋์, ํฌ.. 2022. 5. 23. ์ ๋ ๋์ - ํฌ๋กฌ ๋ชจ๋ฐ์ผ ๋ฏธ๋ฌ๋ง(chrome://inspect) ์ฌ์ฉ ๋ฐฉ๋ฒ 1. PC ํฌ๋กฌ์์ "chrome://inspect" ์ฃผ์๋ก ์ ์ 2. PC์์ adb๋ก ๋ชจ๋ฐ์ผ ๋ธ๋ฆฟ์ง ์ฐ๊ฒฐ 3. ๋ชจ๋ฐ์ผ์์ ํฌ๋กฌ ์ฑ ์คํ ์๋๋ก์ด๋ ํฌ๋กฌ์ ์กฐ์ํ ๋ ์๋ ๋ฉํธ ์์๋ฅผ ๋ถ์ํ ๋ ์ฌ์ฉํ๋ฉด ์ข๋ค. https://janger.tistory.com/250?category=1254107 ์ฐธ๊ณ : https://jfbta.tistory.com/71 ํฌ๋กฌ ์ธ์คํํฐ] chrome inspect, ๋ชจ๋ฐ์ผ ์น ๋๋ฒ๊น ํ๋ ๋ฐฉ๋ฒ Chrome Inspect. ํ๊ธ๋ก 'ํฌ๋กฌ ์ธ์คํํฐ' ๋ผ๊ณ ํ๋๋ฐ ์ค์ ๋ชจ๋ฐ์ผ ๊ธฐ๊ธฐ๋ฅผ ํฌ๋กฌ ๊ฐ๋ฐ์ํด์์ ๊ทธ๋๋ก ๊ตฌํํด์ ํธ๋ฆฌํ๊ฒ ๋๋ฒ๊น ํ ์ ์๋ ๊ธฐ๋ฅ์ด๋ค. ์ฌ์ฉ๋ฐฉ๋ฒ ์ฒซ์งธ, ๋ชจ๋ฐ์ผ USB ๋๋ผ์ด๋ฒ๋ฅผ ์ค์นํ๋ค. jfbta.tistory.com 2022. 4. 9. ์ ๋ ๋์ - ์๋๋ก์ด๋ ๋ชจ๋ฐ์ผ ํฌ๋กฌ ์กฐ์ ๋๋ฐ์ด์ค๊ฐ ํ ๊ฐ์ธ ๊ฒฝ์ฐ # -*- coding: utf-8 -*- from selenium import webdriver import time options = webdriver.ChromeOptions() options.add_experimental_option('androidPackage', 'com.android.chrome') driver = webdriver.Chrome(options=options) driver.implicitly_wait(15) driver.get('https://www.naver.com') time.sleep(1) print(driver.current_url) driver.execute_script('alert(1)') ๋์ค์ ์๊ฒ๋ ์ฌ์ค์ธ๋ฐ driver = webdriv.. 2022. 4. 9. ์ ๋ ๋์ - ๋ค์ด๋ฒ ๋ก๊ทธ์ธ ๋ด ํ์ง ์ฐํํ๊ธฐ from selenium import webdriver from selenium.webdriver.common.keys import Keys import pyperclip import time uid = '{์์ด๋}' upw = '{๋น๋ฐ๋ฒํธ}' driver = webdriver.Chrome('chromedriver.exe') driver.implicitly_wait(15) driver.get('https://nid.naver.com/nidlogin.login?mode=form&url=https%3A%2F%2Fwww.naver.com') pyperclip.copy(uid) time.sleep(1) driver.find_element_by_xpath('/html/body/div[1]/div[2]/div/di.. 2022. 2. 8. ์ ๋ ๋์ - C#์์ Selenium ํ๊ฒฝ ์ค์ ๋น์ฃผ์ผ ์คํ๋์ค์ NuGet ์ ์ "Selenium"์ ๊ฒ์ํ ๋ค์ Selenium.WebDriver, Selenium.Support, Selenium.WebDriver.ChromeDriver ํจํค์ง๋ฅผ ์ค์น using (IWebDriver driver = new ChromeDriver()) { driver.Url = "http://ipinfo.io/ip"; driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5); var element = driver.FindElement(By.XPath("//body")); label1.Text = element.Text; } ์์ดํผ๋ฅผ ๊ฐ์ ธ์ค๋ ์ ๋ ๋์ ์์ค ์ฝ๋ ์ฐธ๊ณ : https://nowonbun.tist.. 2022. 1. 25. ์ ๋ ๋์ - ํ์ผ ์ฌ๋ฌ๊ฐ ํ ๋ฒ์ ์ฌ๋ฆฌ๊ธฐ driver.find_element_by_css_selector('input[type=file]').send_keys(r"C:\\Users\\BomNal\\Desktop\\๋ฒ๊ฐ์ฅํฐ\\img.png" + '\n' + r"C:\\Users\\BomNal\\Desktop\\๋ฒ๊ฐ์ฅํฐ\\img2.png" + '\n' + r"C:\\Users\\BomNal\\Desktop\\๋ฒ๊ฐ์ฅํฐ\\img3.jpg") r"C:\\Users\\BomNal\\Desktop\\๋ฒ๊ฐ์ฅํฐ\\img.png" + '\n' + r"C:\\Users\\BomNal\\Desktop\\๋ฒ๊ฐ์ฅํฐ\\img2.png" ์๋ ๊ฒ \n์ ๊ธฐ์ค์ผ๋ก ์ฌ๋ฌ๊ฐ ์ฌ๋ฆด ์๊ฐ ์์ ์ถ์ฒ: https://sbiografia.tistory.com/12 python selen.. 2022. 1. 17. ์ ๋ ๋์ - ๋ธ๋ผ์ฐ์ ํ์ฌ url ๊ฐ์ ธ์ค๊ธฐ driver.current_url 2022. 1. 15. ์ ๋ ๋์ - ๋ธ๋ผ์ฐ์ ๋ก๋ฉ ํ์์์ ์ฃผ๊ธฐ, implicitly_wait, explicitly wait ๊ธฐ์กด time.sleep(n) ๊ฒฝ์ฐ๋ ๋ธ๋ผ์ฐ์ ๊ฐ ๋ค ๋ก๋๊ฐ ๋๋ ์๋๋ ์๊ธฐ ์ฐจ๋ก๊ฐ ์ค๋ฉด ๋ฐ๋ก sleep ๋ชจ๋์ ๋ค์ด๊ฐ์ ์ ํด์ง ์๊ฐ ๋์ ๋๊ธฐ๋ฅผ ํ์ง๋ง ์ ๋ ๋์์์ ์ ๊ณตํ๋ implicitly_wait ๊ฒฝ์ฐ ์๋ฅผ๋ค์ด driver.implicitly_wait(15)์ "๋ธ๋ผ์ฐ์ ๊ฐ ๋ก๋๊ฐ ์๋ฃ ๋ ๋๊น์ง" 15์ด๋ฅผ ๊ธฐ๋ค๋ฆฌ๊ณ ๋ค ๋ก๋๊ฐ ๋๋ฉด ๋ฐ๋ก ๋ค์ ์ฝ๋๋ฅผ ์คํํ๋ฏ๋ก ๋ ์๋๊ฐ ๋นจ๋ผ์ง. driver.implicitly_wait(15) # seconds [ํด๋น ์์๊ฐ ๋ณด์ผ ๋๊น์ง ์ผ์์ ์ง] from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.common.by import By from selenium.webdriver.. 2022. 1. 15. ์ ๋ ๋์ - iframe ์กฐ์ driver.switch_to.frame('id๊ฐ') # iframe์ผ๋ก ์ ํํ๊ธฐ driver.switch_to.default_content() # ๋ค์ ์๋๋๋ก ๋์์ค๊ธฐ 2022. 1. 15. ์ด์ 1 2 3 4 ๋ค์ 728x90