I am using imacros and Chrome to record logins to 5 websites. I use no encryption, and just type in my login and password for each site. Four of the sites work fine, but www.sportsbetting.ag, gives me a webpage that says my "The Password field must have a value". When I walk through the steps I can see that for this site it puts in the correct login but a nonsensical password instead of the one I included in the code.
VERSION BUILD=844 RECORDER=CR
URL GOTO=https://www.sportsbetting.ag/
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:loginForm ATTR=ID:CustomerID CONTENT=SB341413
SET !ENCRYPTION NO
TAG POS=1 TYPE=INPUT:PASSWORD FORM=ID:loginForm ATTR=ID:Password CONTENT=FAKEword
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:loginForm ATTR=ID:button-submit-login
For privacy I have used FAKEword above instead of the actual password but I have checked the actual login and password many times to ensure I've typed it correctly.
In similar situations you can try to record your macros in 'Experimental event recording mode'. Perhaps the following code may work:
VERSION BUILD=844 RECORDER=CR
URL GOTO=https://www.sportsbetting.ag/
TAG POS=1 TYPE=INPUT:TEXT FORM=ID:loginForm ATTR=ID:CustomerID CONTENT=SB341413
EVENT TYPE=CLICK SELECTOR="HTML>BODY>HEADER>DIV:nth-of-type(2)>DIV:nth-of-type(2)>FORM>LABEL:nth-of-type(2)>INPUT" BUTTON=0
EVENTS TYPE=KEYPRESS SELECTOR="HTML>BODY>HEADER>DIV:nth-of-type(2)>DIV:nth-of-type(2)>FORM>LABEL:nth-of-type(2)>INPUT" CHARS="FAKEword"
TAG POS=1 TYPE=INPUT:SUBMIT FORM=ID:loginForm ATTR=ID:button-submit-login
Related
My /htmx webpage has a list of links like this one:
<li class="collection-item" hx-push-url="true" hx-post="/htmx/file/open/specification.idp"
hx-trigger="click" hx-target="#screen">Click me</li>
When I click it, the #screen target is correctly updated, and the browser URL is correctly changed to /htmx/file/open/specification.idp (thanks to hx-push-url="true").
When I click the browser back button, the original htmx page is properly displayed, but the browser URL remains /htmx/file/open/specification.idp, instead of becoming /htmx.
How can I get the browser URL to be /htmx? I'm using Htmx 1.8.0. I also tried using hx-get.
I have an API which redirects to browser and on that we have to enter username and password.
The API returns the HTML page as part of the response. How from HTML response we can pick username and password via locator Id and click button?
I have tried below but as it is returned in the response I somehow need to tell where in response find that field and input.
And input('#username', 'username')
And input('#password', 'password')
When click('#kc-login')
What I would do is scrape any information needed out of the HTML like this: https://stackoverflow.com/a/61605535/143475
And then form an HTTP request to do what the clicking of the button actually does. Remember no matter what HTML and complex JS / UI you see, finally everything becomes some HTTP request. Use the developer tools "network" part of the browser to figure this out.
The rest is up to your creativity. Work with some web-developers if required.
I updated our version of self asserted to 2.1.2 to address the new password reset flow. Doing this has added the social_intro to our custom log in page.
I have added the local_intro_generic to the page and it works fine, However the social_intro still show up. We are not allowing for any social login and I don't want it displayed. I can edit it... but I don't see a way to hide it either in the documents or any other search.
You can edit the html file that is getting referenced for that page. Hide the divs that you don't need after checking the class names of the divs using inspect element.
I'm trying to create a script to perform mass actions on a personal account (context not relevant, I think). I figured a way to do it using this script for iMacros and it was working.
However, I needed to add a new variable to have a random delay between actions instead of having a fixed "WAIT SECONDS". Since I'm using the free version of iMacros, this doesn't work because it's using more than 3 variables :(
Now, problem is, I have no idea how to convert this script into another browser automation tool. Anyone can help me "translate it" to Kantu or Selenium, for example? Would it work? I'm aware that requesting opinion on tools is off-topic, but that's not my intention. I really don't care which program I use as long as it's free and it works. From what I've seen Kantu or Selenium are ok, but I don't understand how they work and I can't actually code (noob here) so I have no idea how to "translate" this to another platform. I need this for browser automation on Chrome (using a mac, if relevant).
Can anyone help me on this? Would really love to get this going but paying $99 for the premium version of iMacros is out of question as this is for personal use.
Thank you!
This is the script I have on iMacros:
SET !TIMEOUT_STEP 1
SET !ERRORIGNORE YES
SET !EXTRACT_TEST_POPUP NO
SET !VAR1 {{!LOOP}}
ADD !VAR1 1
TAB T=1
TAG POS={{!VAR1}} TYPE=DIV ATTR=CLASS:-utLf EXTRACT=TXT
SET !VAR2 {{!EXTRACT}}
SET RANDOM EVAL("var randomNumber=Math.floor(Math.random()*85 + 95); randomNumber;")
SET !EXTRACT NULL
TAB OPEN
TAB T=2
URL GOTO=https://www.example.com/{{!VAR2}}
WAIT SECONDS={{RANDOM}}
TAG POS=1 TYPE=BUTTON ATTR=CLASS:BY3EC<SP><SP>_0mzm*
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON ATTR=CLASS:aOOlW<SP>-Cab_*
TAB CLOSE
Your current Script can easily be converted to iMacros v10.0.x 'Free' for CR/FF using only 1 single Var, and you'll still have 2 Vars available...:
SET !TIMEOUT_STEP 1
SET !ERRORIGNORE YES
SET !EXTRACT_TEST_POPUP NO
SET !VAR1 {{!LOOP}}
ADD !VAR1 1
TAB T=1
TAG POS={{!VAR1}} TYPE=DIV ATTR=CLASS:-utLf EXTRACT=TXT
SET !VAR1 EVAL("var randomNumber=Math.floor(Math.random()*85 + 95); randomNumber;")
TAB OPEN
TAB T=2
URL GOTO=https://www.example.com/{{!EXTRACT}}
WAIT SECONDS={{!VAR1}}
TAG POS=1 TYPE=BUTTON ATTR=CLASS:BY3EC<SP><SP>_0mzm*
WAIT SECONDS=2
TAG POS=1 TYPE=BUTTON ATTR=CLASS:aOOlW<SP>-Cab_*
TAB CLOSE
(And I've explained on the iMacros Forum how to use an "infinite" Nb of Vars with only 2 Vars..., trying to "lobby" against that Limitation that I find a bit useless and only nagging Users...)
Thread/Solution(s) referred to on the iMacros Forum:
- Re: 2018/2019 and the Future of iMacros...
=> ... Where Users with some Account on the iMacros Forum are "encouraged" to support "my Crusade" against the stupid in my Opinion 3x Var Limitation for the 'Free' Editions...
I'm trying to make a macro which given an URL its asks me for the captcha and re-submits a listing, so far this is what I have:
VERSION BUILD=8970419 RECORDER=FX
TAB T=1
URL GOTO=about:newtab
URL GOTO=http://www.revolico.com/modificar-anuncio.html?key=WyqAGDMyFyoH15527264
WAIT SECONDS=6
URL GOTO=javascript:window.scrollBy(0,20000)
PROMPT "Enter captcha" !VAR1
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:insertad ATTR=ID:recaptcha_response_field CONTENT={{!VAR1}}
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:insertad ATTR=NAME:send_form
I don't want to scroll all the way down to see the captcha but to show the image in the prompt, can anyone help me?
This is a classified ads website and you can use the given url to test.
Thanks in advance,
you just need to add tags to images of post scroll right in the picture
like this:
TAG POS = 1 TYPE = a ATTR = DIV ID: adcopy-puzzle-image
change the id of the image fits the image on the website that may help