![]() ![]() ![]() I really don't like the nd_keys(Keys.TAB) but it works from selenium import webdriverfrom import Byfrom import Keysfrom import expected_conditions as ECimport timedriver = webdriver.Firefox()driver.get('')assert 'CityFibre' in (2.5)cookies = WebDriverWait(driver, 10).until(EC.presence_of_element_located((By.ID, "onetrust-accept-btn-handler")))cookies.click()PostCode = border rounded-lg border-grey-950 bg-white text-grey-950 ac-outline focus:border-cf-blue placeholder-grey-500 md:text-base lg:rounded-xl lg:rounded-tl-none lg:rounded-tl-none rounded-tl-none pr-32 pl-11 py-5']")) PostCode.click()nd_keys('EH17 7RY')nd_keys(Keys.ENTER)time.sleep(2.5)nd_keys(Keys.TAB)nd_keys(Keys.ENTER)time.sleep(15)message = driver.find_element(By.TAG_NAME,('h2')).textprint(message) print('The End') ![]() ![]() Here are a few issues that I'm not happy with:. **Great news! You can connect to the CityFibre network**īelow is the code I've created so far, and I would love any pointers or improvements. I'm having issues extracting the results from below This is a work-in-progress project where I enter a postcode (which will eventually become a list) into a website and then save the results from the website to a CSV using some kind of loop to move onto the next. ![]()
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |