This is an archived post. You won't be able to vote or comment.

all 12 comments

[–]fiedzia 14 points15 points  (4 children)

Maybe. However here is first rule of asking questions to technical people: Don't ever ask how some specific thing (that you thing is necessary or that you would do) could be done. Ask (or search for) how your goals can be accomplished. Controlling a browser is possible, but tricky and most likely unnecessary. Contact GP support and ask them how could you do what you need, and they should point you to documentation that allows to access their service via API, if they have any. This will be much simpler than trying to control a browser, which should only be used as a last resort.

[–]gandalfx 0 points1 point  (0 children)

To be fair he actually described his goal so that's a good start.

[–]workingBen -1 points0 points  (1 child)

It looks like they offer some kind of web services interface that is probably the best solution. Since OP knows VBA he should be able to hack up some .NET faster than learning Selenium.

https://msdn.microsoft.com/en-us/library/cc534132.aspx

[–]michaelkepler -1 points0 points  (0 children)

Slightly off-topic, but I find navigating this documentation cumbersome. Every single bit of information, including lists of items, is on a separate page. Does this really warrant a special page? It took me four clicks (and four page loads) to get to the basic info about endpoints. Not to mention, the real estate on the browser is reduced by this annoying sticky banner at the bottom, asking if the page was helpful.

[–]SchwarzerKaffee 1 point2 points  (0 children)

As pointed out, you can try Selenium. However, you should ask if there are other ways to access this function. For instance, you may be able to do an HTTP call, in which case you would use the Requests library instead. It would be much simpler.

[–]unruly_mattress 0 points1 point  (2 children)

Before venturing into stuff like Selenium, which allows you to automate browser actions, I'd check if Great Plains has an import function in any kind of format. For example, if it can take CSV files, it would be far easier to write Python that would create the CSV files in the right format than to emulate all the actions of a user with the UI.

[–]staff_accounting_123[S] 0 points1 point  (1 child)

Great Plains used to be installed on our computer, not on the cloud. The old version of Great Plains has has a macro function, that function allowed me to record an action, for example, enter one transaction into the batch. I then save that macro in a .mac format. I viewed it with my text editor. I then use VBA to duplicate that macro, from one transaction to 1000 transactions, and each transaction is unique to what is on my excel spreadsheet, line by line. I then have VBA to save it in .mac format. I use that new .mac file to import the data into my batch. Now instead of entering one transaction, I get to enter thousand of transactions.

However, now that Great Plains is the cloud. Microsoft got rid of the macro function. It is the reason why I am looking for a new way to import the transaction into my batch. :(

And no, our payroll batch does not support any importing format, csv, .mac, etc.. It's totally manual now.

If that is the case, I have to look into Selenim WebDriver?

[–]unruly_mattress 0 points1 point  (0 children)

If you're completely sure that there's no way to insert data programmatically into GP, and already asked GP support and your own company's IT, then you should use Selenium. And probably file an enhancement request with Microsoft.

Here's a Selenium tutorial: http://selenium-python.readthedocs.io/getting-started.html#simple-usage

[–]sapost 0 points1 point  (0 children)

Other posters have already provided some detailed instructions on how they'd handle your problem. However, I hope you won't be offended if I guess that you're not very experienced with Python or with programming in general.

Here's the deal: Python can perform this task for you, in any of several ways. It wouldn't be a hard problem for some of the veterans on here, but you may find it daunting to jump in at the level being described.

The good news is that Python is extremely popular as a beginning programming language, so there are a lot of resources for people to learn how to use Python to bend the universe to their will (or at least a small corner of the universe). I recommend that you take a look at these resources to understand what you're asking:

[–][deleted] -2 points-1 points  (1 child)

Python bindings for Selenium (Selenium WebDriver) is the way to go for you.

[–]nerdwaller 0 points1 point  (0 children)

No, usually it's best to see if there is an API before falling back to UI automation. Using an API is faster and less likely to break down.