Help in Selecting the Radio button based on a Text

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
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
jyotirmaya
Posts: 49
Joined: Wed Jul 27, 2016 6:25 pm

Help in Selecting the Radio button based on a Text

Post by jyotirmaya » Thu Aug 02, 2018 4:18 pm

I am using the below code for automation of forwarding some tasks, but I am having a problem, there are 5 Radio buttons in the web page and with the below code its automatically selecting Radio 4 button. But actually the Radio button changes its position.
For example
SL Name Button
1 A
2 B
3 C
4 D
5 E

The serial name is constant but the Name changes its position, for example at first A is on Radio button 1 then it changes to 5 in the next web page and so on. So if I want to use the Radio button of E only even if it changes its position then what should be change in the code ?
Image

Code: Select all

VERSION BUILD=9030808 RECORDER=FX
TAB T=1
TAG POS=1 TYPE=TEXTAREA FORM=NAME:fwddatailreport_f ATTR=ID:offRemarks_f CONTENT=The<SP>Applicant
TAG POS=1 TYPE=SELECT FORM=NAME:fwddatailreport_f ATTR=ID:status_f CONTENT=%F
TAG POS=1 TYPE=SELECT FORM=NAME:fwddatailreport_f ATTR=ID:officeType_f CONTENT=%3
TAG POS=4 TYPE=INPUT:RADIO FORM=NAME:fwddatailreport_f ATTR=ID:Id_f
ONDIALOG POS=1 BUTTON=OK CONTENT=
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:fwddatailreport_f ATTR=NAME:Submit
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Help in Selecting the Radio button based on a Text

Post by chivracq » Thu Aug 02, 2018 4:35 pm

jyotirmaya wrote:I am using the below code for automation of forwarding some tasks, but I am having a problem, there are 5 Radio buttons in the web page and with the below code its automatically selecting Radio 4 button. But actually the Radio button changes its position.
For example
SL Name Button
1 A
2 B
3 C
4 D
5 E

The serial name is constant but the Name changes its position, for example at first A is on Radio button 1 then it changes to 5 in the next web page and so on. So if I want to use the Radio button of E only even if it changes its position then what should be change in the code ?
Image

Code: Select all

VERSION BUILD=9030808 RECORDER=FX
TAB T=1
TAG POS=1 TYPE=TEXTAREA FORM=NAME:fwddatailreport_f ATTR=ID:offRemarks_f CONTENT=The<SP>Applicant
TAG POS=1 TYPE=SELECT FORM=NAME:fwddatailreport_f ATTR=ID:status_f CONTENT=%F
TAG POS=1 TYPE=SELECT FORM=NAME:fwddatailreport_f ATTR=ID:officeType_f CONTENT=%3
TAG POS=4 TYPE=INPUT:RADIO FORM=NAME:fwddatailreport_f ATTR=ID:Id_f
ONDIALOG POS=1 BUTTON=OK CONTENT=
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:fwddatailreport_f ATTR=NAME:Submit
(F)CIM (again...! :roll: ) for me to have a look...! :mrgreen:

But from a quick look, you probably need 'Relative Positioning', I would think... :idea:
- (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...
jyotirmaya
Posts: 49
Joined: Wed Jul 27, 2016 6:25 pm

Re: Help in Selecting the Radio button based on a Text

Post by jyotirmaya » Fri Aug 03, 2018 12:46 am

Sorry

I am using Bowser Firefox 48.0
iMacros for Firefox 9.0.3
Windows 7 Professional 64-bit Operating system
Last edited by jyotirmaya on Mon Aug 06, 2018 2:38 am, edited 2 times in total.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Help in Selecting the Radio button based on a Text

Post by chivracq » Fri Aug 03, 2018 1:55 am

jyotirmaya wrote:Sorry

I am using

Code: Select all

Firefox 48.0, 
I macros for Firefox 9.0.3 and  
Windows 7 Professional 64-bit Operating system
Okay...! Good-good...! :D
(But last time I ask, I have to ask again each time you open a new Thread... Hum, and would be "nice" if you could spell "iMacros" correctly... If you manage to squeeze 3 Typos in just one simple Word, I'm already "suspicious" about the "Quality" of your Scripts, ah-ah...! :shock: )
v9.0.3 for FF still works until FF56 btw..., same like v8.9.7 for FF as well... (But if you update FF to FF57(+), you'll have to update iMacros as well, to v10.0.2.)

Yeah, well, like I already mentioned, 'Relative Positioning' looks like the way to go for me from the Info you've provided, without being able to look at the (HTML Structure of the) Page myself...
=> You first tag your 'A'/'B'/etc SN Name that you want to choose (to use it as 'Anchor') and see if 'POS=R1' selects the correct/corresponding RB...

Hum, and if it doesn't work, but pfff..., will be a lot of if/if/if..., you can then better upload some HTML Saveas of the Page to your Thread as I guess your Site is probably behind L&P... Hum, maybe 2 or 3 Samples, with different Permutations/Positions of the RB's...
- (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...
jyotirmaya
Posts: 49
Joined: Wed Jul 27, 2016 6:25 pm

Re: Help in Selecting the Radio button based on a Text

Post by jyotirmaya » Fri Aug 03, 2018 2:46 am

chivracq wrote:
jyotirmaya wrote:Sorry

I am using

Code: Select all

Firefox 48.0, 
I macros for Firefox 9.0.3 and  
Windows 7 Professional 64-bit Operating system
Okay...! Good-good...! :D
(But last time I ask, I have to ask again each time you open a new Thread... Hum, and would be "nice" if you could spell "iMacros" correctly... If you manage to squeeze 3 Typos in just one simple Word, I'm already "suspicious" about the "Quality" of your Scripts, ah-ah...! :shock: )
v9.0.3 for FF still works until FF56 btw..., same like v8.9.7 for FF as well... (But if you update FF to FF57(+), you'll have to update iMacros as well, to v10.0.2.)

Yeah, well, like I already mentioned, 'Relative Positioning' looks like the way to go for me from the Info you've provided, without being able to look at the (HTML Structure of the) Page myself...
=> You first tag your 'A'/'B'/etc SN Name that you want to choose (to use it as 'Anchor') and see if 'POS=R1' selects the correct/corresponding RB...

Hum, and if it doesn't work, but pfff..., will be a lot of if/if/if..., you can then better upload some HTML Saveas of the Page to your Thread as I guess your Site is probably behind L&P... Hum, maybe 2 or 3 Samples, with different Permutations/Positions of the RB's...
Thank you for your quick replies, But when I am selecting HTML file in attachment it don't allow its showing error that The extension html is not allowed.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Help in Selecting the Radio button based on a Text

Post by chivracq » Fri Aug 03, 2018 2:56 am

jyotirmaya wrote:Thank you for your quick replies, But when I am selecting HTML file in attachment it don't allow its showing error that The extension html is not allowed.
Yep indeed, only Images are allowed to be uploaded to a Thread, and zipped Files, max 256Kb.

But did you try first the Sugg I gave you about 'R-Positioning'...? I only help Users who "really" get stuck after trying by themselves to find the Solution..., I won't be writing your Script...
Hum, never mind, will be quicker if I have a look myself indeed, ah-ah...! OK, upload your 2 or 3 Samples... (Can be in the same '.zip'.)
But you'll need to correct the ugly Spelling on "iMacros"... :roll:
- (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...
jyotirmaya
Posts: 49
Joined: Wed Jul 27, 2016 6:25 pm

Re: Help in Selecting the Radio button based on a Text

Post by jyotirmaya » Fri Aug 03, 2018 3:05 am

Sorry but I am not sure about R-positioning because I am not acquainted with coding,iMacros is very easy to handle because of its UI that's why I am using without any coding knowledge. Yes further I will spell the iMacros Correctly :D .
I have attached two HTML files one with the Radio boxes and second without it, I want the 4th number Radio box button to be clicked always but it changes its position when a new page loads.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Help in Selecting the Radio button based on a Text

Post by chivracq » Sat Aug 04, 2018 1:33 am

jyotirmaya wrote:Sorry but I am not sure about R-positioning because I am not acquainted with coding,iMacros is very easy to handle because of its UI that's why I am using without any coding knowledge. Yes further I will spell the iMacros Correctly :D .
I have attached two HTML files one with the Radio boxes and second without it, I want the 4th number Radio box button to be clicked always but it changes its position when a new page loads.
OK, a bit "fed up" of checking your Thread several times since 24h, "Ugly x3 Typos" still not corrected, it's WE, nice Weather, I have a Gig tomorrow, I'll check your Thread again on Monday... 8)
jyotirmaya wrote:Sorry

I am using Firefox 48.0, I macros for Firefox 9.0.3 and Windows 7 Professional 64-bit Operating system

Yeah, no Change...! :roll:

(Pity for you because I did have a look at your Upload, and I had directly a Sol for you...., and it's the Sol I had already mentioned in my first Reply, but you obviously didn't try anything..., no Difficulty at all, completely straightforward... :shock: )

But OK, I'll check again on Monday I guess... 8)
- (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...
jyotirmaya
Posts: 49
Joined: Wed Jul 27, 2016 6:25 pm

Re: Help in Selecting the Radio button based on a Text

Post by jyotirmaya » Mon Aug 06, 2018 2:39 am

I have corrected my post :)
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Help in Selecting the Radio button based on a Text

Post by chivracq » Mon Aug 06, 2018 8:15 am

jyotirmaya wrote:I have corrected my post :)
Oh...., finally...! 4 days needed to mention your FCI and to manage to spell "iMacros" correctly, I won't go through so much hassle next time... :idea:

But OK, I had managed to have a look at your Site/Page before the WE..., hum, and you're "lucky", I still have the Script..., and, exactly like I had mentioned in my first Reply already, "it" works perfectly with 'Relative Positioning', with just 1 extra-Line...:

Code: Select all

TAG POS=1 TYPE=TD ATTR=TXT:SAKTI<SP>PRASAD<SP>SRICHANDAN(<SP>Addl.Tah<SP>)
TAG POS=R1 TYPE=INPUT:RADIO FORM=NAME:fwddatailreport_f ATTR=ID:Id_f
And you can make it a bit more "practical" by using a Var where you can specify the Name you want to use...:

Code: Select all

SET Forward_To "SAKTI PRASAD SRICHANDAN"

TAG POS=1 TYPE=TD ATTR=TXT:{{Forward_To}}*
TAG POS=R1 TYPE=INPUT:RADIO FORM=NAME:fwddatailreport_f ATTR=ID:Id_f
... And even more practical if you only want to specify a part of the Name, like only "SRICHANDAN" in your Example (instead of the full "SAKTI PRASAD SRICHANDAN"), by adding some extra R-Pos Statement... Full Script:

Code: Select all

VERSION BUILD=8820413 RECORDER=FX
TAB T=1
'URL GOTO=file:///D:/TEMP/iMacros/Temp/_Forum%20Cases/jyotirmaya/radio/2.html

SET Forward_To "SRICHANDAN"
'SET Forward_To "SAKTI PRASAD SRICHANDAN"
'SET Forward_To "INDIRA SAHU"

TAG POS=1 TYPE=TD ATTR=TXT:Official<SP>Name(<SP>Designation<SP>)
'TAG POS=1 TYPE=TD ATTR=TXT:SAKTI<SP>PRASAD<SP>SRICHANDAN(<SP>Addl.Tah<SP>) // (Recorded)
TAG POS=R1 TYPE=TD ATTR=TXT:*{{Forward_To}}*
TAG POS=R1 TYPE=INPUT:RADIO FORM=NAME:fwddatailreport_f ATTR=ID:Id_f
(Tested on iMacros for FF v8.8.2, Pale Moon v26.3.3 (=FF47), Win10_x64.)

There wasn't hardly any Difficulty, it's pretty "straightforward" and "basic" Functionality, especially for someone who's been using iMacros for 2 years now, I would think... :?

OK, enjoy...! :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...
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Help in Selecting the Radio button based on a Text

Post by chivracq » Sun Aug 12, 2018 3:04 am

And, any Feedback/Follow-up...?, I don't know how many days later, I saw you checking your Thread and my last Post with several Solutions/Scripts a few days ago..!?
Joined: 27/07/2016 - 20:25
Last visited: 07/08/2018 - 06:58
But still no Feedback/Follow-up..!? :shock:

[4 days needed to mention your FCI + correct some stupid Typo... OK... :shock: , Script posted, and now 6 days later still no Follow-up...!? :shock: :shock: ]

I was going to say as a complete-complete Joke that you were behaving like some High Caste "Dignitary" in India..., they all behave the same on the Forum, expecting arrogantly sbd to write their Script without trying anything by themselves..., no big deal, but still surprising for a Country supposed to be "High Level" in IT, but hum, mini-Check on your IP-Address, and oops, you are actually from India (I had not checked from the Content of your Page/Site), then OK, I guess the "Circle is round" then, I found my "Explanation"... :shock:
=> OK, enjoy the Script, and don't be surprised if I don't try to help you a next time, ah-ah...! :wink:

[But there is definitely "stg" wrong in that Country with "that" stupid Caste System, sbd may be some "High Level" Dignitary in India from Birth, and still be some "Untouchable"-like Low-Level for iMacros from their iMacros Tech-Level, tja... :roll: Everything is relative, I guess...! :idea: ]
[End of Rant, ah-ah...! Grrr..., I don't like it when Users don't follow up, only comforting me to not write Scripts anymore for other Users... :roll: ]
- (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...
jyotirmaya
Posts: 49
Joined: Wed Jul 27, 2016 6:25 pm

Re: Help in Selecting the Radio button based on a Text

Post by jyotirmaya » Fri Aug 17, 2018 3:10 pm

chivracq wrote:And, any Feedback/Follow-up...?, I don't know how many days later, I saw you checking your Thread and my last Post with several Solutions/Scripts a few days ago..!?
Joined: 27/07/2016 - 20:25
Last visited: 07/08/2018 - 06:58
But still no Feedback/Follow-up..!? :shock:

[4 days needed to mention your FCI + correct some stupid Typo... OK... :shock: , Script posted, and now 6 days later still no Follow-up...!? :shock: :shock: ]

I was going to say as a complete-complete Joke that you were behaving like some High Caste "Dignitary" in India..., they all behave the same on the Forum, expecting arrogantly sbd to write their Script without trying anything by themselves..., no big deal, but still surprising for a Country supposed to be "High Level" in IT, but hum, mini-Check on your IP-Address, and oops, you are actually from India (I had not checked from the Content of your Page/Site), then OK, I guess the "Circle is round" then, I found my "Explanation"... :shock:
=> OK, enjoy the Script, and don't be surprised if I don't try to help you a next time, ah-ah...! :wink:

[But there is definitely "stg" wrong in that Country with "that" stupid Caste System, sbd may be some "High Level" Dignitary in India from Birth, and still be some "Untouchable"-like Low-Level for iMacros from their iMacros Tech-Level, tja... :roll: Everything is relative, I guess...! :idea: ]
[End of Rant, ah-ah...! Grrr..., I don't like it when Users don't follow up, only comforting me to not write Scripts anymore for other Users... :roll: ]
I am extremely sorry, I didn't know that you have replied, I was online in the forum after your reply but didn't check this topic. As I didn't get any notification after reply, whatever you said is correct, anyone will feel bad if after help he will not get any feedback. I am sorry for that. and yes your code is working, today I have checked this post while asking another question in forum, but you have already mentioned that you will never help again :(
Yes I am from India, but I am unable to explain here what you have said like "Dignitary India", High caste, arrogant, High level in IT etc but I am sure that you can understand the scenario if I will explain. Anyone will think like this if he will not get any feedback. I don't want my problems to explain here in public domain you can understand my situation once I will elaborate. anyways sorry again.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Help in Selecting the Radio button based on a Text

Post by chivracq » Fri Aug 17, 2018 3:28 pm

jyotirmaya wrote:I am extremely sorry, I didn't know that you have replied, I was online in the forum after your reply but didn't check this topic. As I didn't get any notification after reply, whatever you said is correct, anyone will feel bad if after help he will not get any feedback. I am sorry for that. and yes your code is working, today I have checked this post while asking another question in forum, but you have already mentioned that you will never help again :(
Yes I am from India, but I am unable to explain here what you have said like "Dignitary India", High caste, arrogant, High level in IT etc but I am sure that you can understand the scenario if I will explain. Anyone will think like this if he will not get any feedback. I don't want my problems to explain here in public domain you can understand my situation once I will elaborate. anyways sorry again.
Oh..., well..., hum..., then forget about my "nasty Rant" then, yep, got a bit "frustrated" from helping you with your Script, actually even writing it which I very-very rarely do for other Users, and then not hearing anymore from you while I had seen you checking the Forum, but OK, never mind, glad you finally followed up, and that the Script works OK... :D

Then, tja, for some other Thread, you can still open it (in the correct Sub-Forum + Descriptive Thread Title + FCI mentioned + Script and URL and what you've tried...), then I can still have a look and decide if I answer it or not..., and I'm not the only Advanced User on the Forum anyway... :wink:

And make sure to check the Option to get some automatic Notification (per E-mail) for each Reply when you open your Threads... :idea:
- (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...
jyotirmaya
Posts: 49
Joined: Wed Jul 27, 2016 6:25 pm

Re: Help in Selecting the Radio button based on a Text

Post by jyotirmaya » Fri Aug 17, 2018 3:49 pm

chivracq wrote:
jyotirmaya wrote:I am extremely sorry, I didn't know that you have replied, I was online in the forum after your reply but didn't check this topic. As I didn't get any notification after reply, whatever you said is correct, anyone will feel bad if after help he will not get any feedback. I am sorry for that. and yes your code is working, today I have checked this post while asking another question in forum, but you have already mentioned that you will never help again :(
Yes I am from India, but I am unable to explain here what you have said like "Dignitary India", High caste, arrogant, High level in IT etc but I am sure that you can understand the scenario if I will explain. Anyone will think like this if he will not get any feedback. I don't want my problems to explain here in public domain you can understand my situation once I will elaborate. anyways sorry again.
Oh..., well..., hum..., then forget about my "nasty Rant" then, yep, got a bit "frustrated" from helping you with your Script, actually even writing it which I very-very rarely do for other Users, and then not hearing anymore from you while I had seen you checking the Forum, but OK, never mind, glad you finally followed up, and that the Script works OK... :D

Then, tja, for some other Thread, you can still open it (in the correct Sub-Forum + Descriptive Thread Title + FCI mentioned + Script and URL and what you've tried...), then I can still have a look and decide if I answer it or not..., and I'm not the only Advanced User on the Forum anyway... :wink:

And make sure to check the Option to get some automatic Notification (per E-mail) for each Reply when you open your Threads... :idea:
Actually Subscribe Topic is in the bottom of the page in Black colour text within Blue colour line, hence its difficult to find, and I have subscribed then not sure whether it will come to my mail when a new post arrives in my thread. sorry for the last time and sent you friend request in FB. Thanks :D
Post Reply