maricelu wrote:Hello.
I am trying to build up a Wordpress website cloning system with the help of iMacros.
What I want to do:
1. Enter Wordpress login URL
2. Fill in credentials: user and password
3. Change form action URL to main site URL that is in the address bar (by default the form sets the URL of the site I am cloning from, so manually I need to go into the View Source mode and change it to main site URL) (stuck here)
4. Hit the 'Submit' button
4.1. Confirm the Dialog box showing a warning
5. Visit Wordpress General Settings page
6. Add new site URL into the Wordpress Address URL and Site Address URL fields
7. Save changes
So far, my code looks like this:
Basically at Line 7, I want to strip out the oldurl and leave only the path that goes after domain name, or, alternatively, replace the oldurl with the new url.
Code: Select all
VERSION BUILD=9030808 RECORDER=FX
TAB T=1
URL GOTO=https://newurl.com/loginpath
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:loginform ATTR=ID:user_login CONTENT=username
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:loginform ATTR=ID:user_pass CONTENT=password
TAG POS=1 FORM=ID:loginform&&ACTION:http://oldurl.com/loginpath CONTENT=http://newurl.com/loginpath
ONDIALOG POS=1 BUTTON=OK CONTENT=
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:loginform ATTR=ID:wp-submit
URL GOTO=https://newurl.com/wp-admin/options-general.php
TAG POS=1 TYPE=INPUT:URL FORM=ACTION:options.php ATTR=ID:siteurl CONTENT=https://newurl.com
TAG POS=1 TYPE=INPUT:URL FORM=ACTION:options.php ATTR=ID:home CONTENT=https://newurl.com
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ACTION:options.php ATTR=ID:submit
Appreciate your advice.
maricelu wrote:I forgot to add information on my setup, so here it is:
1. Firefox 49.0
2. iMacros 9.0.3
3. Windows 10 OS
Ah...!, that's better indeed, ah-ah...!!
Oh, and I see that you've removed the "real" 'newurl' that was previously included in the last 2 'INPUT' Lines in your Script, ah-ah...!
But, hum..., I'm not sure I exactly understand what you want...
Line 7 is this one:
Code: Select all
TAG POS=1 FORM=ID:loginform&&ACTION:http://oldurl.com/loginpath CONTENT=http://newurl.com/loginpath
That Line looks a bit "strange" to me btw, as it doesn't contain any 'ATTR' Parameter..., the 'FORM' Parameter is Optional and you could even probably remove it, but I always thought the 'ATTR' Parameter for the 'TAG' Command was Mandatory...
If you want to "strip out" 'oldurl', you can simply replace it with a Wildcard in your Script, I would think:
Code: Select all
TAG POS=1 FORM=ID:loginform&&ACTION:http://*.com/loginpath CONTENT=http://newurl.com/loginpath
This will probably work, I would think...
If you need to first "retrieve" that 'oldurl' from your current URL in the Browser, you can access it with '!URLCURRENT' for example, or you can probably extract it from some HTML Element that will contain that Info in the Source using the 'EXTRACT' Mechanism, and maybe/probably 'EVAL()' to isolate/clean it from the whole Extract, and you use a Var in your Line 7 Statement to use that Value:
Code: Select all
TAG POS=1 FORM=ID:loginform&&ACTION:http://{{oldurl}}.com/loginpath CONTENT=http://newurl.com/loginpath
- (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...