I need to keep this site "Open" all time, please help!

Discussions and Tech Support related to website data extraction, screen scraping and data mining using iMacros.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
arwinrt
Posts: 2
Joined: Thu May 19, 2022 4:10 pm

I need to keep this site "Open" all time, please help!

Post by arwinrt » Fri May 20, 2022 6:20 am

Good day!

I'm working as a Manager in a restaurant. We need to monitor the availability of the restaurant to the customers since some of our employees, are turning it off or making it "Busy", even if we don't really have customers. So long story short, Google led me to iMacros, the problem is, my macro is missing something. It can "Open" our restaurant, the script is working, but I need it to just ignore if we're already "Open", so do not do something else, just "Open" if we are "Busy". The error is displayed like this:

RuntimeError: element SPAN specified by TXT:reopen was not found, line: 4

I want it to run indefinitely, so when someone sets our restaurant to "Busy", the macro will just press "Reopen" itself.

Here's what is inside my macro:

VERSION BUILD=1011 RECORDER=CR
URL GOTO=https://private.portal.restaurant/vendo ... ability-tb
TAG POS=1 TYPE=SPAN ATTR=TXT:Update
TAG POS=1 TYPE=SPAN ATTR=TXT:reopen
WAIT SECONDS=30
SET !ERRORIGNORE YES

Please see the images I attached, and I am hoping that someone will help me with my issue.

Sincerely,
Arwin T.
Attachments
This is when the error happens, it can't find the TXT reopen since we're already Open.
This is when the error happens, it can't find the TXT reopen since we're already Open.
Everything is good here.
Everything is good here.
Everything is good here.
Everything is good here.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: I need to keep this site "Open" all time, please help!

Post by chivracq » Fri May 20, 2022 1:18 pm

arwinrt wrote:
Fri May 20, 2022 6:20 am
Good day!

I'm working as a Manager in a restaurant. We need to monitor the availability of the restaurant to the customers since some of our employees, are turning it off or making it "Busy", even if we don't really have customers. So long story short, Google led me to iMacros, the problem is, my macro is missing something. It can "Open" our restaurant, the script is working, but I need it to just ignore if we're already "Open", so do not do something else, just "Open" if we are "Busy". The error is displayed like this:

Code: Select all

RuntimeError: element SPAN specified by TXT:reopen was not found, line: 4
I want it to run indefinitely, so when someone sets our restaurant to "Busy", the macro will just press "Reopen" itself.

Here's what is inside my macro:

Code: Select all

VERSION BUILD=1011 RECORDER=CR
URL GOTO=https://private.portal.restaurant/vendor-availability-tb
TAG POS=1 TYPE=SPAN ATTR=TXT:Update
TAG POS=1 TYPE=SPAN ATTR=TXT:reopen
WAIT SECONDS=30
SET !ERRORIGNORE YES
Please see the images I attached, and I am hoping that someone will help me with my issue.

Sincerely,
Arwin T.

Hum, your Thread has nothing specific to the 'iMacros for CR' Sub-Forum (especially if you don't even mention your FCI (explained in the Forum Rules + in my Sig...), => I'll move it to the 'General' one, or rather to the 'Data Extraction' one, as you want to base some Conditional Behaviour on some (extracted) Content from the Page...

=> FCIM...! :mrgreen: (Read my Sig...)
=> iMacros for CR v10.1.1, 'Free'/'PE'/'Trial'...?, CR v...?, OS...?

>>>

As a "quick Answer" (that I'll elaborate if needed once you'll have mentioned your FCI), you are already "very close" with `!ERRORIGNORE`, but you need to place that Command before the "offending" Command/Statement which aborts your Script when the "reopen" Element is not found, and not after, ah-ah...! Or I would simply put it at the beginning of your Script... :idea:

That would already "do the job", and will keep your Script looping... The "Update" Element/Link will always be found, and therefore will always open the next Screen, but the 'Reopen' Button won't be there when the Restaurant is already in "Active" Status, and you have the `URL GOTO` reloading the Starting Page will simply reload that Page at the next Loop.
"Neater" would be to use 'Relative Positioning' to click on the "Update" Link only "Conditionally" when the Status is "Busy" already, and you could even set different Conditions based on different Reasons, => only on "Kitchen is too busy" for example, or if you had several Branches, only for some specific Branch(es), ... but I guess your Employees would quickly "figure it out", and would then start using some alternative Reasons... :P
(The "Prayer" one got me a "big Smile", ah-ah...!, that's a good one...! :o :shock: :P :wink: )
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
arwinrt
Posts: 2
Joined: Thu May 19, 2022 4:10 pm

Re: I need to keep this site "Open" all time, please help!

Post by arwinrt » Fri May 20, 2022 3:22 pm

Thank you for your time brother, here's my FCIM:

- (F)CI(M) = (Full) Config Info (Missing): iMacros for Chrome Version 10.1.1 + Microsoft Edge + Windows 11
Post Reply