๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
  • Tried. Failed. Logged.
728x90

๐Ÿ‘จ๐Ÿผโ€๐Ÿ’ป๊ฐœ๋ฐœ158

์…€๋ ˆ๋‹ˆ์›€ - ํŒŒ์ผ ์—ฌ๋Ÿฌ๊ฐœ ํ•œ ๋ฒˆ์— ์˜ฌ๋ฆฌ๊ธฐ 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.
์…€๋ ˆ๋‹ˆ์›€ - ๋ธŒ๋ผ์šฐ์ €์— ์—”ํ„ฐ ๋ณด๋‚ด๊ธฐ def enter(driver): actions = ActionChains(driver) actions.send_keys(Keys.RETURN) actions.perform() 2022. 1. 15.
์…€๋ ˆ๋‹ˆ์›€ - alert, confirm ๋„๊ธฐ, ํŒŒ์ด์ฌ ํ™•์ธ) WebDriverWait(driver, 10).until(EC.alert_is_present()) alert = driver.switch_to.alert alert.accept() ์ทจ์†Œ) WebDriverWait(driver, 10).until(EC.alert_is_present()) alert = driver.switch_to.alert alert.dismiss() ์ฐธ๊ณ : https://dejavuqa.tistory.com/272 Selenium์œผ๋กœ Alert ์ฐฝ ์ฒ˜๋ฆฌํ•˜๊ธฐ Alert ์ฐฝ ์ฒ˜๋ฆฌ์— ๋Œ€ํ•ด ํ™•์ธํ•ด ๋ณด๊ฒ ์Šต๋‹ˆ๋‹ค. ์šฐ์„  ์•„๋ž˜์™€ ๊ฐ™์ด html ํŒŒ์ผ์„ ๋งŒ๋“ค์—ˆ์Šต๋‹ˆ๋‹ค. Click the button to display a simple alert box. Try it Click the button t.. 2022. 1. 15.
์•ˆ๋“œ๋กœ์ด๋“œ ์ŠคํŠœ๋””์˜ค - ์•ฑ ์•„์ด์ฝ˜ ์ˆจ๊ธฐ๊ธฐ/๋ณด์ด๊ธฐ [์ˆจ๊ธฐ๊ธฐ] PackageManager p = getPackageManager(); ComponentName componentName = new ComponentName(this, com.apps.MainActivity.class); // activity which is first time open in manifiest file which is declare as p.setComponentEnabledSetting(componentName,PackageManager.COMPONENT_ENABLED_STATE_DISABLED, PackageManager.DONT_KILL_APP); [๋ณด์ด๊ธฐ] PackageManager p = getPackageManager(); ComponentName componentN.. 2021. 12. 19.
์•ˆ๋“œ๋กœ์ด๋“œ ์ŠคํŠœ๋””์˜ค - ๋ถ€ํŒ…์‹œ ์ž๋™ ์‹คํ–‰ [AndroidManifest.xml] [StartActivityOnBootReceiver.java] package com.codinginflow.onbootreceiverexample; import android.content.BroadcastReceiver; import android.content.Context; import android.content.Intent; public class StartActivityOnBootReceiver extends BroadcastReceiver { @Override public void onReceive(Context context, Intent intent) { if (Intent.ACTION_BOOT_COMPLETED.equals(intent.getAct.. 2021. 12. 19.
์•ˆ๋“œ๋กœ์ด๋“œ ์ŠคํŠœ๋””์˜ค - ๋ฐฑ๊ทธ๋ผ์šด๋“œ ์„œ๋น„์Šค ์‹คํ–‰ ์ถœ์ฒ˜: https://stackoverflow.com/questions/46716069/how-to-make-background-process-in-android-studio How To Make Background Process in Android Studio hi guys thank you for answering my question,i have made an android app in android studio i want to make funtion when i close the app the function start automatically in background is there any way ... stackoverflow.com [์•กํ‹ฐ๋น„ํ‹ฐ] public class App extends .. 2021. 12. 19.
์ž๋ฐ” - PassMaker (๋น„๋ฐ€๋ฒˆํ˜ธ ์‚ฌ์ „ ๋งŒ๋“œ๋Š” ๋„๊ตฌ) ์ž๋ฐ” Swing์„ ์—ฐ์Šตํ• ๊ฒธ ๋งŒ๋“ค์–ด ๋ณด์•˜๋‹ค. ์ง์ž‘์ด ๊ฐ€๋Š” ๋‹จ์–ด๋ฅผ ๋„ฃ๊ณ  ์ˆซ์ž ๋ฒ”์œ„๋ฅผ ์ •ํ•œ ํ›„ ๋ณ€ํ™˜์„ ๋ˆ„๋ฅด๋ฉด ๋น„๋ฐ€๋ฒˆํ˜ธ ์‚ฌ์ „์ด ๋งŒ๋“ค์–ด์ง€๋Š” ๊ฐ„๋‹จํ•œ ์œ ํ‹ธ๋ฆฌํ‹ฐ ๋„๊ตฌ import java.awt.*; import javax.swing.*; import java.awt.event.*; import java.util.ArrayList; import java.util.StringTokenizer; public class Main extends JFrame{ DefaultListModel input_passwords = new DefaultListModel(); JTextField inputArea = null; JTextField numberRange = null; JTextArea outList = null; boolea.. 2021. 12. 15.
ํด๋ผ์šฐ๋“œ์— ๋ฌด๋ฃŒ๋กœ ์†Œ์Šค์ฝ”๋“œ ๋ณด๊ด€ํ•˜๊ธฐ(pastebin.com) https://pastebin.com/ Pastebin.com - #1 paste tool since 2002! Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time. pastebin.com 2021. 12. 13.
ํŒŒ์ด์ฌ - base64๋ฅผ ์ด๋ฏธ์ง€ ํŒŒ์ผ๋กœ ์ €์žฅํ•˜๊ธฐ import base64 imgdata = base64.b64decode(imgstring) filename = 'some_image.jpg' # I assume you have a way of picking unique filenames with open(filename, 'wb') as f: f.write(imgdata) # f gets closed when you exit the with statement # Now save the value of filename to your database ์ถœ์ฒ˜: https://stackoverflow.com/questions/16214190/how-to-convert-base64-string-to-image/16214280 How to convert base6.. 2021. 12. 8.
728x90