Relative_positioning

Discussions and Tech Support related to the iMacros Google Chrome extension.
Forum rules
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
i_use_imacros
Posts: 4
Joined: Mon Jul 29, 2019 9:15 am

Relative_positioning

Post by i_use_imacros » Mon Jul 29, 2019 9:53 am

Hallo,

what is your solution to the following problem?

I try a relative positioning on the following website.

this is unfortunately not how it works

Code: Select all

URL GOTO=https://autoit.de/wcf/index.php?disclaimer/
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:https://autoit.de/wcf/index.php?disclaimer/ ATTR=NAME:accept
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:* CONTENT=1
TAG POS=R1 TYPE=INPUT:EMAIL ATTR=NAME:* CONTENT=2
TAG POS=R1 TYPE=INPUT:EMAIL ATTR=NAME:* CONTENT=3	
SET !ENCRYPTION NO
TAG POS=R1 TYPE=INPUT:PASSWORD ATTR=NAME:* CONTENT=4
TAG POS=R1 TYPE=INPUT:PASSWORD ATTR=NAME:* CONTENT=4
TAG POS=R1 TYPE=INPUT:TEXT ATTR=NAME:* CONTENT=5
the original recording looks like this

Code: Select all

URL GOTO=https://autoit.de/wcf/index.php?disclaimer/
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:https://autoit.de/wcf/index.php?disclaimer/ ATTR=NAME:accept
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:aabf12bbbf21 CONTENT=1
TAG POS=1 TYPE=INPUT:EMAIL ATTR=NAME:b1c33dfd3c CONTENT=2
TAG POS=1 TYPE=INPUT:EMAIL ATTR=NAME:c3844096eed2f5 CONTENT=3
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:5fe4bb9cb41b57 CONTENT=4
TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:a85a2dc5 CONTENT=4
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:values[option33] CONTENT=5
1. My iMacros version is VERSION BUILD=1005
2. I'm using Windows 10 Home
3. Browser: Google Chrome Version 75.0.3770.142 (Official Build) (64-bit)

best regards
chivracq
Posts: 8763
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Relative_positioning

Post by chivracq » Mon Jul 29, 2019 9:30 pm

i_use_imacros wrote:
Mon Jul 29, 2019 9:53 am

Code: Select all

1. My iMacros version is VERSION BUILD=1005
2. I'm using Windows 10 Home
3. Browser: Google Chrome Version 75.0.3770.142 (Official Build) (64-bit)

Hallo,

what is your solution to the following problem?

I try a relative positioning on the following website.

this is unfortunately not how it works

Code: Select all

URL GOTO=https://autoit.de/wcf/index.php?disclaimer/
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:https://autoit.de/wcf/index.php?disclaimer/ ATTR=NAME:accept
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:* CONTENT=1
TAG POS=R1 TYPE=INPUT:EMAIL ATTR=NAME:* CONTENT=2
TAG POS=R1 TYPE=INPUT:EMAIL ATTR=NAME:* CONTENT=3	
SET !ENCRYPTION NO
TAG POS=R1 TYPE=INPUT:PASSWORD ATTR=NAME:* CONTENT=4
TAG POS=R1 TYPE=INPUT:PASSWORD ATTR=NAME:* CONTENT=4
TAG POS=R1 TYPE=INPUT:TEXT ATTR=NAME:* CONTENT=5
the original recording looks like this

Code: Select all

URL GOTO=https://autoit.de/wcf/index.php?disclaimer/
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:https://autoit.de/wcf/index.php?disclaimer/ ATTR=NAME:accept
WAIT SECONDS=2
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:aabf12bbbf21 CONTENT=1
TAG POS=1 TYPE=INPUT:EMAIL ATTR=NAME:b1c33dfd3c CONTENT=2
TAG POS=1 TYPE=INPUT:EMAIL ATTR=NAME:c3844096eed2f5 CONTENT=3
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:5fe4bb9cb41b57 CONTENT=4
TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:a85a2dc5 CONTENT=4
TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:values[option33] CONTENT=5
1. My iMacros version is VERSION BUILD=1005
2. I'm using Windows 10 Home
3. Browser: Google Chrome Version 75.0.3770.142 (Official Build) (64-bit)

best regards
FCI mentioned, very good, but 'Free'/'PE' is still missing...

Your Thread though has very probably nothing specific to the 'iMacros for CR' Sub-Forum or you should mention in which other Version(s)/FCI(s) you've also tested where your Script works but fails only in CR. (Correct Sub-Forum would have been the 'General' one, but no need to duplicate now...)

OK, I was able to have a look at your Script and Site, and using 'Relative Positioning' if the Elements on the Page have Dynamic Names and/or ID's looks like the correct way to go, very good...! :D
Then OK, the following Script, which uses 'Relative Positioning' in a little bit more "reliable" way than you were attempting, seems to work fine for me...:

Code: Select all

VERSION BUILD=8820413 RECORDER=FX
TAB T=1
'URL GOTO=https://autoit.de/wcf/index.php?register/

TAG POS=1 TYPE=LABEL FORM=ACTION:https://autoit.de/wcf/index.php?register/ ATTR=TXT:Benutzername
TAG POS=R1 TYPE=INPUT:TEXT FORM=ACTION:https://autoit.de/wcf/index.php?register/ ATTR=ID:* CONTENT=i_use_imacros

TAG POS=2 TYPE=LABEL FORM=ACTION:https://autoit.de/wcf/index.php?register/ ATTR=TXT:E-Mail-Adresse
TAG POS=R1 TYPE=INPUT:EMAIL ATTR=NAME:* CONTENT=i_use_imacros@gmail.com

TAG POS=1 TYPE=LABEL FORM=ACTION:https://autoit.de/wcf/index.php?register/ ATTR=TXT:E-Mail-Adresse<SP>wiederholen
TAG POS=R1 TYPE=INPUT:EMAIL ATTR=NAME:* CONTENT=i_use_imacros@gmail.com
(Tested on iMacros for FF v8.8.2, PM v26.3.3 (=FF47), Win10_x64.)

Notice that instead of using only 1 Anchor and making all 5 other 'INPUT' Fields relative to the 1st one, I each time use their corresponding 'LABEL' Element as Anchor. :idea:
I only handled the first 3 ones, I let you do the rest with the next Sections... :wink:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
i_use_imacros
Posts: 4
Joined: Mon Jul 29, 2019 9:15 am

Re: Relative_positioning

Post by i_use_imacros » Wed Jul 31, 2019 8:38 am

I use the Free Edition in Chrome.

it's a very good idea. Thank you very much!
chivracq
Posts: 8763
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Relative_positioning

Post by chivracq » Wed Jul 31, 2019 8:58 am

i_use_imacros wrote:
Wed Jul 31, 2019 8:38 am
I use the Free Edition in Chrome.

it's a very good idea. Thank you very much!
OK for FCI, 'Free'/'PE' didn't really play a role in this one, even if I would have had a better "Implementation" if I had known if you were using the 'PE' Version... :|

Hum, "good idea", tja...!, I only mention "Best Practices", then of course everything I mention/post is "a good idea"... I would rather have expected you to test my Script and to confirm that it also works for you, and for you to post your Final Script... But OK, I reckon it works and you understood the Principle... :D
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
i_use_imacros
Posts: 4
Joined: Mon Jul 29, 2019 9:15 am

Re: Relative_positioning

Post by i_use_imacros » Wed Jul 31, 2019 11:48 am

I forgot to write that. Sorry. I tested your script and it works very well.

I learned from it. I wrote the script for another website with the relative positioning where I encountered the same problems.

Please tell me about the alternative possibilities of the PE version. That seems interesting.
chivracq
Posts: 8763
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Relative_positioning

Post by chivracq » Wed Jul 31, 2019 2:13 pm

i_use_imacros wrote:
Wed Jul 31, 2019 11:48 am
I forgot to write that. Sorry. I tested your script and it works very well.

I learned from it. I wrote the script for another website with the relative positioning where I encountered the same problems.

Please tell me about the alternative possibilities of the PE version. That seems interesting.
Ah OK, good to hear, and Thanks for the "Feedback" then... :D

Well, about "alternative possibilities of the PE version", I used 3 times your "i_use_imacros" Pseudo in the Script I wrote for the first 3 Input Fields, that I hard-coded 3 times in the Script. Had you been using the 'PE' Version, I would then have declared this String as a Var.
But the 'Free' Version only supports using 3 Vars, so you better "save" your Vars if you can only use 3...! (even if you can't squeeze that many Vars in just 50 Lines...!, which is another Limitation for the 'Free' Version...)
And User-defined Vars are also not supported in the 'Free' Version while I consider calling all Vars in a Script "!VARn" not a "Best Practice"...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
i_use_imacros
Posts: 4
Joined: Mon Jul 29, 2019 9:15 am

Re: Relative_positioning

Post by i_use_imacros » Wed Jul 31, 2019 8:34 pm

Many thanks for the insight into the alternative.

I learned a lot. Thanks a lot.
chivracq
Posts: 8763
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Relative_positioning

Post by chivracq » Wed Jul 31, 2019 8:39 pm

i_use_imacros wrote:
Wed Jul 31, 2019 8:34 pm
Many thanks for the insight into the alternative.

I learned a lot. Thanks a lot.
Yep, you're welcome... 8)
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Post Reply