Bottom Page

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with pop-up
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.

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()
        username = browser.find_element_by_css_selector('input.UserInput:nth-child(2)')
        password = browser.find_element_by_css_selector('input.UserInput:nth-child(4)')
        signIn = browser.find_element_by_css_selector('#signin') # Sign in
        projectPortal = browser.find_element_by_css_selector('#appIconDiv0 > a:nth-child(1)')
        centerNumberField = browser.find_element_by_css_selector('.SearchInput > input:nth-child(1)')
        centerNumberField2 = browser.find_element_by_css_selector('.SearchInput > input:nth-child(1)')
        search = browser.find_element_by_css_selector('span.SearchIcon')
        # 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 = newCenterNumber
I 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!
Larz60+ wrote Jun-12-2018, 05:40 PM:
Please post all code, output and errors (it it's entirety) between their respective tags. Refer to BBCode help topic on how to post. Use the "Preview Post" button to make sure the code is presented as you expect before hitting the "Post Reply/Thread" button.

Even though this is quickbase, will still look better is enclosed in python tags. I added for you this time
you can check quick base API

there are also python modules to work with it
Thanks! I should have thought about that. I'll take a peek at those.
@Buran I did look into these. I dont have access to the db. I have to use and search Quickbase just like a normal user.

Top Page

Forum Jump:

Users browsing this thread: 1 Guest(s)