-
Notifications
You must be signed in to change notification settings - Fork 674
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automation example - RedMart rescheduling or repeating groceries order #24
Comments
Adding on, wait() is usually not necessary as there is auto-wait for UI elements to appear until timeout. For above, it is to ensure that the click has been processed by the webapp (seems to have some lag) before proceeding, and that previous page items have been fully loaded before proceeding. |
Updated above version 2 with browser prompt for URL, and handles multiple quantity per item |
#31 - ask() shows the question in terminal window. This is not intuitive if automation is running on the Chrome browser and a prompt appears in terminal window to ask for user input. Raising an issue to update behaviour to show prompt in Chrome browser, if it's available. PS - similar issue exists if chrome_browser = False and visual_automation = True. The terminal may not be in the foreground during the automation flow to be visible for user inputs. However, there isn't a consistent way to show SikuliX popup with focus across platforms. Thus KIV for now. #32 - At present, if visual automation mode is not on and `snap('page.png', 'screenshot.png')` is used, there is no error message saying that `init(visual_automation = True)` is needed to use this. Raising an issue to show error message instead of hanging waiting for SikuliX response. #24 - readme linking to RedMart online groceries example to automate re-adding all items to cart (to reschedule delivery, need to cancel and create new order manually)
#31 - ask() shows the question in terminal window. This is not intuitive if automation is running on the Chrome browser and a prompt appears in terminal window to ask for user input. Raising an issue to update behaviour to show prompt in Chrome browser, if it's available. PS - similar issue exists if chrome_browser = False and visual_automation = True. The terminal may not be in the foreground during the automation flow to be visible for user inputs. However, there isn't a consistent way to show SikuliX popup with focus across platforms. Thus KIV for now. #32 - At present, if visual automation mode is not on and `snap('page.png', 'screenshot.png')` is used, there is no error message saying that `init(visual_automation = True)` is needed to use this. Raising an issue to show error message instead of hanging waiting for SikuliX response. #24 - readme linking to RedMart online groceries example to automate re-adding all items to cart (to reschedule delivery, need to cancel and create new order manually)
Closing issue as this example is now added to readme under API reference section. |
[TAGUI][ERROR] - 'utf-8' codec can't decode bytes in position 44-45: invalid continuation byte ,I think u should support utf-8 , Chinese example |
Can you paste the Python code that cause this error message so that I can check? In this issue #14 the package has switched over to use UTF-8. Not sure of the cause, it could be that webpage you are accessing has non-UTF-8 characters. Wait for your code to check further. I assume you are using new version of the package For eg of Chinese text that works, below goes to Baidu to search and show the first result - import rpa as r
r.init()
r.url('http://www.baidu.com')
r.type('kw', 'tagui[enter]')
print(r.read('//*[@id="1"]'))
r.close() The output shows correctly the Chinese and English text when I run above Python script -
|
Hey @kensoh |
Hi @sunnyhemnani the setup instructions for this package are here - Just If you are referring to the TagUI RPA software instead of this Python package, |
@kensoh I want to know the basic Server specifications for TagUI RPA software? |
A basic Windows, Linux or macOS operating system should be able to run TagUI or RPA for Python. No need high-powered CPU or high RAM to run it. Chrome is needed for automating websites. |
@kensoh is there a way to set an active chrome window or by title, as the working window for the RPA bot to work with? It seems that when it launches the URL, its in a slim incognito window - If i'm working in a secured/ login page or one that is only accessible via another portal, then it requires a bit of running around to get there each time I want to use the bot. thanks |
Hi @yeders to do that you can use visual automation, and do a click() on the taskbar / docking bar to click on the Chrome icon to make it in the foreground. You can also try simulating [alt][tab] (Windows) or [cmd][tab] (Mac) using keyboard() and keep repeating until Chrome window is in front (use hover() to check for some unique thing on the screen to tell that it is ready). |
If i use href to get part of the address link, which method is used |
For reading attributes of a web element, the syntax is using |
Hi @ringomass, I assume that you want to read the URL for use later. In that case, first find a good way to point to the item, eg some XPath. After that then do You can try google more on XPath to see how to write XPath, or try using the Chrome inspector to copy out the XPath - https://tagui.readthedocs.io/en/latest/faq.html#how-do-i-find-the-xpath-of-a-web-element Above website doesn't look like public can access so I can't try it. PS - and once you find how to click on it, using r.click('XPath') will do, no need use read(). See this for info on what type of inputs can be given to point to the webpage item - https://github.com/tebelorg/RPA-Python#element-identifiers |
Whenever there is a need to reschedule or repeat our groceries delivery on RedMart.com, there is a need to manually add back all the previous items one by one to create a new order. There is no option to repeat an order (unbelievable).
My wife is very frustrated with that, because in between clicks there is so much waiting time, and the website cannot be ctrl-clicked to open new tabs to do this efficiently. So I wrote below automation script for her. Instead of wasting time doing mindless work every week, now she can double-click this Python script and automate the process herself.
PS - we have since left Singapore and no longer use RedMart, thus below code would likely not work with updates to the website. But it should give you an idea of what's possible with rpa package and how you can approach a scenario.
The text was updated successfully, but these errors were encountered: