Click on a button WITHOUT re-opening the web page

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
StefanM
Posts: 7
Joined: Sun Oct 14, 2018 10:01 am

Click on a button WITHOUT re-opening the web page

Post by StefanM » Sun Oct 14, 2018 10:37 am

In Firefox I need a macro that simply clicks a button WITHOUT re-opening that page.

The scenario:
On wetransfer.com I already have filled in everything (email address + path to the file to be uploaded)
I only want the macro to click the "Transfer-button".
Can anybody help with a macro for that?
I.e. going to the tab (e.g. tab 3 from the left) with that filled in page and then clicking the "Transfer-button"

If this is not possible:
Then I would need a macro that fills in the details for me.
- Re-opening WeTransfer.com
- Type in email address.
- Click on the (+) button to browse for a file I want to upload.
- Select that file from the default directory
- Add that file
- Click the "Transfer-button"

Is this possible?

Thanks for any efforts taken!
Regards,
Stefan
Attachments
Button(s) to click
Button(s) to click
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Click on a button WITHOUT re-opening the web page

Post by chivracq » Sun Oct 14, 2018 10:44 am

StefanM wrote:In Firefox I need a macro that simply clicks a button WITHOUT re-opening that page.

The scenario:
On wetransfer.com I already have filled in everything (email address + path to the file to be uploaded)
I only want the macro to click the "Transfer-button".
Can anybody help with a macro for that?
I.e. going to the tab (e.g. tab 3 from the left) with that filled in page and then clicking the "Transfer-button"

If this is not possible:
Then I would need a macro that fills in the details for me.
- Re-opening WeTransfer.com
- Type in email address.
- Click on the (+) button to browse for a file I want to upload.
- Select that file from the default directory
- Add that file
- Click the "Transfer-button"

Is this possible?

Thanks for any efforts taken!
Regards,
Stefan
Pfff, I don't know..., simply install iMacros for FF (you mentioned FF somewhere in your Post), and you try...! :idea:
And if you get stuck somewhere, then yep, "we" can help you... 8)

But if you want to do "click-click-click" on some Web-Page in some Browser, then yep, of course it's possible with iMacros...! 8)

And always mention your FCI when you start a Thread, even if you haven't installed/tried anything with iMacros yet, you already know which Browser you are using (+ Version) and your OS...! :roll:
=> FCIM...! :mrgreen: (Read my Sig...)

And to be honest, I don't understand the "WITHOUT re-opening that page", and even less why you "insist" on "WITHOUT"... :?
=> Install iMacros, try stg, and if you encounter some specific Pb then we can help, your Post is a bit too vague for the time being... :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...
StefanM
Posts: 7
Joined: Sun Oct 14, 2018 10:01 am

Re: Click on a button WITHOUT re-opening the web page

Post by StefanM » Sun Oct 14, 2018 11:14 am

chivracq wrote:
StefanM wrote:In Firefox I need a macro that simply clicks a button WITHOUT re-opening that page.


Thanks for any efforts taken!
Regards,
Stefan
Pfff, I don't know..., simply install iMacros for FF (you mentioned FF somewhere in your Post), and you try...! :idea:
And if you get stuck somewhere, then yep, "we" can help you... 8)
Of course I tried the "normal" way first and I get stuck.
I can get the macro to enter the emailaddress.
But when it should click on the (+) button to browse for the file on my hard disk which I want to upload, it gets stuck.

That's why I thought, it might be another option to have everything filled in manually and just click on the transfer button WITHOUT re-opening the page which would delete all data entered.

That's it :-)
StefanM
Posts: 7
Joined: Sun Oct 14, 2018 10:01 am

Re: Click on a button WITHOUT re-opening the web page

Post by StefanM » Sun Oct 14, 2018 11:20 am

And this is the error message I get, when the macro should click on the (+) [add file button]:

RuntimeError: element PATH specified by D:M60.493<SP>72C79.883<SP>72<SP>96<SP>55.882<SP>96<SP>36.493<SP>96<SP>16.118<SP>79.882<SP>0<SP>60.493<SP>0<SP>40.118<SP>0<SP>24<SP>16.118<SP>24<SP>36.493<SP>24<SP>55.883<SP>40.118<SP>72<SP>60.493<SP>72z&&FILL:#3F9FFF&&FILL-RULE:evenodd&&TXT: was not found, line: 7
StefanM
Posts: 7
Joined: Sun Oct 14, 2018 10:01 am

Re: Click on a button WITHOUT re-opening the web page

Post by StefanM » Sun Oct 14, 2018 12:42 pm

Now, this is the recorded script which only opens the page wetransfer.com and then simply doesn't do anything:

Don't even know how you can tell which input field for the email addresses should be used.
e.g. the name of the field to input the recipient's email address is called "email to"

Browser: Firefox 62.0.3 (64-bit)
Clean installation with no other addons
The script looks to me as if iMacros cannot detect the field names correctly?
And how can this script know which path it should "enter"?

VERSION BUILD=10021450
URL GOTO=https://wetransfer.com/
TAB OPEN
TAB T=2
URL GOTO=https://wetransfer.com/
TAG POS=1 TYPE=INPUT:EMAIL ATTR=NAME:email CONTENT=sender@test.com
TAG POS=1 TYPE=INPUT:EMAIL ATTR=NAME:autosuggest CONTENT=recipient@test.com
TAG POS=1 TYPE=H2 ATTR=TXT:Add<SP>your<SP>files
TAG POS=1 TYPE=INPUT:FILE FORM=ACTION:https://wetransfer.com/ ATTR=* CONTENT=C:\fakepath\test.exe
TAG POS=1 TYPE=BUTTON ATTR=TXT:Transfer
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Click on a button WITHOUT re-opening the web page

Post by chivracq » Sun Oct 14, 2018 7:46 pm

StefanM wrote:
chivracq wrote:
StefanM wrote:In Firefox I need a macro that simply clicks a button WITHOUT re-opening that page.
Pfff, I don't know..., simply install iMacros for FF (you mentioned FF somewhere in your Post), and you try...! :idea:
And if you get stuck somewhere, then yep, "we" can help you... 8)
Of course I tried the "normal" way first and I get stuck.
I can get the macro to enter the emailaddress.
But when it should click on the (+) button to browse for the file on my hard disk which I want to upload, it gets stuck.

That's why I thought, it might be another option to have everything filled in manually and just click on the transfer button WITHOUT re-opening the page which would delete all data entered.

That's it :-)
StefanM wrote:And this is the error message I get, when the macro should click on the (+) [add file button]:

RuntimeError: element PATH specified by D:M60.493<SP>72C79.883<SP>72<SP>96<SP>55.882<SP>96<SP>36.493<SP>96<SP>16.118<SP>79.882<SP>0<SP>60.493<SP>0<SP>40.118<SP>0<SP>24<SP>16.118<SP>24<SP>36.493<SP>24<SP>55.883<SP>40.118<SP>72<SP>60.493<SP>72z&&FILL:#3F9FFF&&FILL-RULE:evenodd&&TXT: was not found, line: 7
StefanM wrote:Now, this is the recorded script which only opens the page wetransfer.com and then simply doesn't do anything:

Don't even know how you can tell which input field for the email addresses should be used.
e.g. the name of the field to input the recipient's email address is called "email to"

Code: Select all

Browser: Firefox 62.0.3 (64-bit)
Clean installation with no other addons
The script looks to me as if iMacros cannot detect the field names correctly?
And how can this script know which path it should "enter"?

Code: Select all

VERSION BUILD=10021450
URL GOTO=https://wetransfer.com/
TAB OPEN
TAB T=2
URL GOTO=https://wetransfer.com/
TAG POS=1 TYPE=INPUT:EMAIL ATTR=NAME:email CONTENT=sender@test.com
TAG POS=1 TYPE=INPUT:EMAIL ATTR=NAME:autosuggest CONTENT=recipient@test.com
TAG POS=1 TYPE=H2 ATTR=TXT:Add<SP>your<SP>files
TAG POS=1 TYPE=INPUT:FILE FORM=ACTION:https://wetransfer.com/ ATTR=* CONTENT=C:\fakepath\test.exe
TAG POS=1 TYPE=BUTTON ATTR=TXT:Transfer
[/color]
OK, good..., so you installed or had already installed iMacros for FF v10.0.2 on FF, tja...!, nothing is "of course" if you don't mention your FCI, nor mention what you've tried, nor post any Script, nor mention what "doesn't work", and only ask if "stg is possible"...! :roll:

=> OK, we have your FCI, even if hum..., you didn't get the "F" which stands for "Full", as your OS is still missing while I already asked for it, will be Win7_x64 or Win10_x64, I reckon...?
And hum, when using iMacros for CR/FF v10.x, you need to mention as well if you are using the 'Free' or the 'PE' Version...?
=>FCI:

Code: Select all

iMacros for FF v10.0.2.1450, 'Free'/'PE'...?, FF v62.0.3_x64, OS...?
(And that (required) Info belongs to your OP when you open a Thread, preferably at the complete beginning of your OP, I usually don't react to Threads if FCI is not included... :idea: )

RuntimeError mentioned, perfect...! :D

And you've posted a Script, excellent...! Now we "are talking", ah-ah...! :D

>>>

Oh-oh-oh...!, but hum..., I see that you've opened a Duplicate or Follow-up Thread, and that's "not good"...!: :shock:
- HELP: Script for Wetransfer in Firefox 62.0.3 (64-bit)

If it's a "Duplicate", then you need to delete that Thread as opening Duplicates is a "Show-Killer" for me to help Users, you can still delete any Post/Thread as long as nobody (included yourself) posted after you, or that Thread will eventually get deleted or merged anyway by the Forum Admin... If that Duplicate Thread contains some supplementary Info relevant for this current Thread, then simply post it directly here like you perfectly did with your last 3 Posts...
If it's a "Follow-up", then you need to post a Link to this current Thread and explaining a bit how it is a Follow-up on this current Thread...
:arrow: => You need to decide what is the "Scope" of this current Thread...? :idea:

Your Thread Title in this current Thread was about "only" clicking on the 'Transfer' Button with all Input Fields already filled in, and without reloading the Page, OK, perfect..., but the Script you posted includes as well filling all Input Fields from your Script... => Decide what you want... :idea:
(And maybe a bit quickly, as if your "other" Thread turns out to be a Duplicate, you can only delete it as long as nobody has posted in it after you, or you'll have to wait for the Forum Admin to delete or merge it, (I cannot do it myself), who happens to be on holiday for 2 weeks, and you'll have to wait for 2 weeks then..., just saying... :idea: )

My "Advice" would be to keep "everything" in this current Thread, we can first handle the Click on the 'Transfer' Button (without the Page Reload), and once this works, "extend" your Script to filling in the different Input Fields... (But you are free to disagree, ah-ah...!) :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...
StefanM
Posts: 7
Joined: Sun Oct 14, 2018 10:01 am

Re: Click on a button WITHOUT re-opening the web page

Post by StefanM » Mon Oct 15, 2018 3:33 pm

First, I would want to purchase the Enterprise edition, if iMacros can do the job.
I tested with different freshly installed FF versions, before and after Quantum.
But I only tested in Windows 10 Pro. I am using test machines for that with clean installations

Please note that it is NOT a duplicate that I posted.
This one here has the "core question" "Click on a button WITHOUT re-opening the web page"
Doesn't necessarily have to be WeTransfer.com

Now, can YOU tell me how to do this?
Simple question.
Yes or No?

The additional information I gave only so that people better understand WHY I want iMacros to do that.


The other question you are referring to, is in particular about a very simple script for WeTransfer.

In case you are an expert with iMacros, it should take you less than 5 minutes to create such a script.
If and when iMacros is able to fill in those data required.
WeTransfer is free. It has only those few input fields and I just want iMacros to fill them in.
That's all.

So, I kindly ask you, if you want to help me here, could you please visit wetransfer.com, pick the free version of WeTransfer (Take me to free) and "record" the script which fills in:
- email (sender)
- email (recipient)
- path of file to send
- and finally clicks on the transfer button

We cannot start with the transfer button (as you suggested), simply because this button won't work before everything has been filled in. Which makes sense.

Now, can and will you help me?
That would be appreciated very, very much!
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Click on a button WITHOUT re-opening the web page

Post by chivracq » Mon Oct 15, 2018 3:55 pm

StefanM wrote:First, I would want to purchase the Enterprise edition, if iMacros can do the job.
I tested with different freshly installed FF versions, before and after Quantum.
But I only tested in Windows 10 Pro. I am using test machines for that with clean installations

Please note that it is NOT a duplicate that I posted.
This one here has the "core question" "Click on a button WITHOUT re-opening the web page"
Doesn't necessarily have to be WeTransfer.com

Now, can YOU tell me how to do this?
Simple question.
Yes or No?

The additional information I gave only so that people better understand WHY I want iMacros to do that.

The other question you are referring to, is in particular about a very simple script for WeTransfer.

In case you are an expert with iMacros, it should take you less than 5 minutes to create such a script.
If and when iMacros is able to fill in those data required.
WeTransfer is free. It has only those few input fields and I just want iMacros to fill them in.
That's all.

So, I kindly ask you, if you want to help me here, could you please visit wetransfer.com, pick the free version of WeTransfer (Take me to free) and "record" the script which fills in:
- email (sender)
- email (recipient)
- path of file to send
- and finally clicks on the transfer button

We cannot start with the transfer button (as you suggested), simply because this button won't work before everything has been filled in. Which makes sense.

Now, can and will you help me?
That would be appreciated very, very much!
Hum, OK then... 8)
Even if your "First, I would want to purchase the Enterprise edition, if iMacros can do the job." sounds a bit "fake" to me, ah-ah...!, you don't need the 'Enterprise Edition' (= 5000E...!) for until now the very basic Functionality that you seem to want, all Free (Add-ons) Versions can do that...! Even if hum, v10.x for CR/FF are now only "Free" for Home Users, Business Users are supposed to acquire (at least) a 'PE' License (= 100E), or 'Professional Edition' (= 500E), both <<5000E...!, the 'Enterprise Edition' is meant for (Semi-)Advanced Programmers who will want to "control" their Web-Automation Scenario from '.vbs/.vba'/'C++'/'C#'/'Python'/etc using the 'Scripting Interface', but you don't sound very Technical, no Offense, ah-ah...! (Don't worry, I'm just a DJ IRL, iMacros is just a "Hobby" for me, that I only use to play "stupid" Tamagochi Games, ah-ah...! :wink: )

>>>

Well then, considering your "original" Qt, about clicking on a Button without reloading the Page, if you only expect a Yes/No Answer, then yep, of course the Answer is 'Yes', but the Answer will always be 'Yes' for any Qt you'll formulate with "Is is possible to... whatever...?", everything is always possible with iMacros, well nearly always, there is always a way to find a "Solution"... (And I already gave you that "Yes it's possible..." Answer in my first Reply btw...)

When you record a Script with iMacros, the Recorder will (by Design) always automatically record an 'URL GOTO=xxx' which contains the original URL from the Page you start recording your Actions from, and when replaying the Script, that 'URL GOTO' Command will then (re)load that URL.
If you don't want the Page to be (re)loaded by the Script, you can simply delete it, or better Practice is to simply comment it out (by adding a Single Quote at the complete beginning of that Line). That's it...! This is the "generic" Answer/Solution to your "core Qt"... 8)

And so, applied to your "Example", this will give:

Code: Select all

VERSION BUILD=10021450
'URL GOTO=https://wetransfer.com/
'...
TAG POS=1 TYPE=BUTTON ATTR=TXT:Transfer
(Provided of course you start your Script from the "expected" URL, and for this Site, you've already (manually) filled in all the required Input Fields for the 'Submit'/'Transfer' Button to become Enabled...)
- (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...
StefanM
Posts: 7
Joined: Sun Oct 14, 2018 10:01 am

Re: Click on a button WITHOUT re-opening the web page

Post by StefanM » Tue Oct 16, 2018 4:49 pm

chivracq wrote: Well then, considering your "original" Qt, about clicking on a Button without reloading the Page, if you only expect a Yes/No Answer, then yep, of course the Answer is 'Yes', but the Answer will always be 'Yes' for any Qt you'll formulate with "Is is possible to... whatever...?", everything is always possible with iMacros, well nearly always, there is always a way to find a "Solution"... (And I already gave you that "Yes it's possible..." Answer in my first Reply btw...)

When you record a Script with iMacros, the Recorder will (by Design) always automatically record an 'URL GOTO=xxx' which contains the original URL from the Page you start recording your Actions from, and when replaying the Script, that 'URL GOTO' Command will then (re)load that URL.
If you don't want the Page to be (re)loaded by the Script, you can simply delete it, or better Practice is to simply comment it out (by adding a Single Quote at the complete beginning of that Line). That's it...! This is the "generic" Answer/Solution to your "core Qt"... 8)

And so, applied to your "Example", this will give:

Code: Select all

VERSION BUILD=10021450
'URL GOTO=https://wetransfer.com/
'...
TAG POS=1 TYPE=BUTTON ATTR=TXT:Transfer
(Provided of course you start your Script from the "expected" URL, and for this Site, you've already (manually) filled in all the required Input Fields for the 'Submit'/'Transfer' Button to become Enabled...)
To explain to you what I'm after:
In the end I either need batch files that I can start using task scheduler or the internal scheduler to start uploads, e.g. every 60 minutes.
1. Starting the transfer in tab 1
2. Starting the transfer in tab 2
3. Starting the transfer in tab 3
...

All text fields in this example have been filled in manually.

So, for testing I would need a script where I can define in which tab iMacros will "click" on the transfer button.
Could you send me such a script?
Thanks in advance!
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Click on a button WITHOUT re-opening the web page

Post by chivracq » Tue Oct 16, 2018 10:01 pm

StefanM wrote:To explain to you what I'm after:
In the end I either need batch files that I can start using task scheduler or the internal scheduler to start uploads, e.g. every 60 minutes.
1. Starting the transfer in tab 1
2. Starting the transfer in tab 2
3. Starting the transfer in tab 3
...

All text fields in this example have been filled in manually.

So, for testing I would need a script where I can define in which tab iMacros will "click" on the transfer button.
Could you send me such a script?
Thanks in advance!
Hum..., you seem to have a pretty unorganized Mind for sbd willing to "invest" 5000E in the 'iMacros Enterprise Edition', the "Ferrari" of Web-Automation, ah-ah...! :shock:

=> "for testing" + "Could you send me such a script?" => Yeah..., in your Dreams, ah-ah...!, I don't write Scripts for other Users, that's not "the way it works" on the Forum, ah-ah...!, nice Try though...! 8)

I and other Advanced Users on the Forum help "real" Users with "real" Usecases and real Scripts and who really get stuck after they've tried their best to find a Solution by themselves, no "serious" Business supposedly ready to invest 5000E in the Enterprise Edition is going to need/use a Script for 'WeTransfer', ah-ah...!, your Scenario sounds a bit "too fake" too me, hum, 2nd funniest Thread of the month actually (you are competing with some 3.5 year iMacros User pretending to be "new" to iMacros, pretty funny also 8) ), so you can better contact Ipswitch Pre-Sales, you'll be dealing with the "real" Experts, and they'll be very happy to give you a "Demo" applied to 'WeTransfer' with the 'Enterprise Edition'... (iOpus/Ipswitch Office in Walldorf, next to Heidelberg... :idea: )

The Forum is for 95% (Advanced) (Free) Users helping (Free) Users mostly, I/we don't care about the commercial Side of the commercial Editions, nobody on the Forum is affiliated with iOpus/Ipswitch, except TechSup of course when they answer a few Threads but they are not very-very active on the Forum, Users/Customers using the commercial Editions of iMacros have Access to TechSupport and to the "real" Experts, ah-ah...! 8)

OK, good luck then..., and hum, I still consider your 2nd Thread as a Duplicate, you didn't convince me at all actually..., I will probably have it deleted or merged with this one once the Forum Admin comes back from holiday... :wink:
(The "Scheduler" new Scope now actually belongs to a new Thread btw, it has nothing to do anymore with a Page being reloaded or not upon or before clicking on some Button, I won't answer that part anyway in this current Thread, and you didn't even react to the Sol I gave you about not reloading the Page... :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...
Post Reply