Coding

selenium ์‚ฌ์šฉ์‹œ url ์ฃผ์†Œ ์ž…๋ ฅ์ด ์•ˆ๋ ๋•Œ

๊น€์œ ๋‹ˆ์ฝ˜ 2023. 9. 21. 12:09

์…€๋ ˆ๋‹ˆ์›€์„ ์‚ฌ์šฉํ•˜์—ฌ

ํฌ๋กฌ ๋“œ๋ผ์ด๋ฒ„๋กœ 

์ž๋™ํ™”ํ•˜๋Š”๋ฐ, 

 

 

์•„๋ฌด๋ฆฌ 

driver.get(url)

ํ•ด๋„ invalidargument exception์ด ๋œฐ ๋•Œ.

 

1) url ์ด string ๊ฐ’์ธ์ง€ ํ™•์ธํ•œ๋‹ค.

2) https://๋ฅผ ์•ž์— ๋ถ™์—ฌ๋ณธ๋‹ค.

 

๋‚ด ๊ฒฝ์šฐ๋Š” m.~~~~๋กœ ์‹œ์ž‘ํ•˜๋Š” ์ฃผ์†Œ์˜€๋Š”๋ฐ, 

์ด ์ฃผ์†Œ๋ฅผ ๋งํฌ๋กœ ์ธ์‹์„ ๋ชปํ•ด์„œ ์ƒ๊ธฐ๋Š” ๋ฌธ์ œ์˜€๋‹ค. 

 

suffix = "https://" 
driver.get( suffix + url )

ํ•˜๋‹ˆ๊นŒ ๋˜์—ˆ์Œ