![]() The third line tells our driver to implicitly wait for 15 seconds. Once you find the webdriver and download it, you’ll want to copy its path and paste it over where it currently says “C:\\webdrivers\\chromedriver.exe” (Note the double backslashes to escape a single backslash) 3. For example, you’ll find the chrome webdriver here. This driver is a file that contains instructions that let you interact with the browser, specifically Chrome browser in this case, and you can get it from anywhere on the internet. The second line is us specifying where we’re getting our “driver” from. ![]() driver = webdriver.Chrome('C:\\webdrivers\\chromedriver.exe') We can’t use a part of Selenium unless we import them, right? Here, we’re importing “webdriver”, which is something that allows your code to interact with a browser like a human does. ![]() A weapon of mass communication.ĭon’t let the disgusting structure of the code intimidate you, let’s walk through it line by line. Nothing says aggressive like 100 messages a minute.Īlright then, here’s your code for the day: from selenium import webdriver driver = webdriver.Chrome('C:\\webdrivers\\chromedriver.exe') driver.implicitly_wait(15) driver.get(' ') driver.find_element_by_css_selector("span").click() inputString = input("Enter message to send: ") while(True): driver.find_element_by_xpath('//*[ driver.find_element_by_xpath('//*[ yes. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |