우아한 프로그래밍

1. 함수


        private void ExecuteScript( IWebDriver driver, string script)
        {
            var jse = (IJavaScriptExecutor)driver;
            jse.ExecuteScript(script, "");
        }

2. 사용방법



            // API 콤보
            element = driver.FindElement(By.CssSelector("#content > div._1npwx1ZsSsDYAihmXQ9tSZ > div.app_w.v2._1RSI0ux8Px9ixMfxc83n_S > div > div.-hGhiZvdJWnjxwoynhvkL > div:nth-child(2) > div._1aFqXiCpPDTEGG-QVtlu3w.value-list-api > div > div > button"));
            element.Click();
            ExecuteScript(driver, "document.querySelector('._1aSTd9e7KunRpiEJaFH0hp li:first-child').click()");
profile

우아한 프로그래밍

@자바조아!

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!