Jun-12-2018, 05:40 PM
Hey all!
First I'd like to start by saying that I am EXTREMELY new to coding so I apologize for my sloppy code.
I am creating a script to log in to Quickbase, search for a location number, find it, open it, parse it, and then dump information into a spreadsheet. I have gotten to logging in and searching for the location ID, but the results come up in a pop-up. I have used Selenium's go_to_alert() function, but this pop-up isn't seen by Selenium. Here is the code. I have removed the pop-up portion as it didn't work, but I was hoping someone has either worked with Quickbase before or knows another way to skin this cat.
I can store the CSS element for the search results in a variable, but printing the variable does not contain the information I need.
Thanks for all the help!
First I'd like to start by saying that I am EXTREMELY new to coding so I apologize for my sloppy code.
I am creating a script to log in to Quickbase, search for a location number, find it, open it, parse it, and then dump information into a spreadsheet. I have gotten to logging in and searching for the location ID, but the results come up in a pop-up. I have used Selenium's go_to_alert() function, but this pop-up isn't seen by Selenium. Here is the code. I have removed the pop-up portion as it didn't work, but I was hoping someone has either worked with Quickbase before or knows another way to skin this cat.
centerNumber = input("What center would you like to search for?: ") while centerNumber != "no": print("Please standby.") print("When my pull is complete, I will close FireFox. Please do not interact with the new FireFox window.") browser = webdriver.Firefox() browser.maximize_window() browser.get('https://regusitpmo.quickbase.com/db/main?a=signin') username = browser.find_element_by_css_selector('input.UserInput:nth-child(2)') username.send_keys('[email protected]') password = browser.find_element_by_css_selector('input.UserInput:nth-child(4)') password.send_keys('Password') signIn = browser.find_element_by_css_selector('#signin') # Sign in signIn.click() projectPortal = browser.find_element_by_css_selector('#appIconDiv0 > a:nth-child(1)') projectPortal.click() time.sleep(5) centerNumberField = browser.find_element_by_css_selector('.SearchInput > input:nth-child(1)') centerNumberField.click() centerNumberField2 = browser.find_element_by_css_selector('.SearchInput > input:nth-child(1)') centerNumberField2.send_keys(centerNumber) search = browser.find_element_by_css_selector('span.SearchIcon') search.click() time.sleep(3) # alert = browser.switch_to_alert() # centerNumberRegEx = re.compile(r"xCentre Number contains '\d\d\d\d': No results") print("Would you like to search for another center?") newCenterNumber = input("Please enter the center number. Typing \"no\" will end the program.: ") centerNumber = newCenterNumberI don't see how to attach an image of the pop-up with search results, but I can email said image if need be.
I can store the CSS element for the search results in a variable, but printing the variable does not contain the information I need.
Thanks for all the help!