I'm trying to learn new things


#1

Hello there,

As the title says i’m trying to learn NEW THINGS for my web automation.

I’m trying to learn these things:

  1. I’m doing like an facebook macro example ten times and after captcha comes can we do an variable to count 10x and then stops or it knows when captcha is there or not and it will stop or notify me?

  2. I tried to use select and when trying to do it “LABEL” doesn’t work with numbers here’s an example

image

  1. Is there anyway to make macro faster?

Thanks and, im gonna learn from this i came here to learn anyways


#2

I didn’t get what you want to do…can you please tell in other words? Or provide your JSON code?
There are ways to implement cycles, some are given in examples of KantuX plugin, other can be found in documentation.


#3

{
“CreationDate”: “2018-9-10”,
“Commands”: [
{
“Command”: “open”,
“Target”: “https://www.amazon.com.au/ap/register?openid.pape.max_auth_age=0&openid.return_to=https%3A%2F%2Fwww.amazon.com.au%2F%3Fref_%3Dnav_ya_signin&prevRID=ENY7PAP7ZV67HYG4RPRV&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.assoc_handle=auflex&openid.mode=checkid_setup&prepopulatedLoginId=&failedSignInCount=0&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&pageId=auflex&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0”,
“Value”: “”
},
{
“Command”: “type”,
“Target”: “id=ap_email”,
“Value”: “email”
},
{
“Command”: “clickAndWait”,
“Target”: “id=continue”,
“Value”: “”
},
{
“Command”: “open”,
“Target”: “https://www.amazon.com.au/Call-Duty-Black-Ops-4/dp/B07BHRJ7RD/ref=sr_1_1?ie=UTF8&qid=1536449425&sr=8-1&keywords=black+ops+4%23”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “id=add-to-cart-button”,
“Value”: “”
},
{
“Command”: “waitForPageToLoad”,
“Target”: “”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “link=Proceed to checkout (1 item)”,
“Value”: “”
},
{
“Command”: “pause”,
“Target”: “2000”,
“Value”: “”
},
{
“Command”: “select”,
“Target”: “id=enterAddressCitySelect”,
“Value”: “label=BLACKBUTT”
},
{
“Command”: “pause”,
“Target”: “1000”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “name=shipToThisAddress”,
“Value”: “”
},
{
“Command”: “waitForPageToLoad”,
“Target”: “”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “//*[@id=“shippingOptionFormId”]/div[3]/div/div/span[1]/span/input”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “id=ccAddCard”,
“Value”: “”
},
{
“Command”: “open”,
“Target”: “https://www.amazon.com.au/gp/buy/payselect/handlers/display.html?hasWorkingJavascript=1”,
“Value”: “”
},
{
“Command”: “pause”,
“Target”: “2000”,
“Value”: “”
},
{
“Command”: “waitForPageToLoad”,
“Target”: “”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “id=continue-top”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “link=No Thanks”,
“Value”: “”
},
{
“Command”: “clickAndWait”,
“Target”: “name=placeYourOrder1”,
“Value”: “”
}
]
}


#4

so what you wanted to do here?
Your macro is on amozone…

  1. You were talking about facebook, no?
  2. i didn’t get about label.
  3. Faster you can make via settings->Replay->command interval

#5

Facebook was an example.


#6

Here is example for simple cycle of clicking on elements:

Cycle clicking script

{
“CreationDate”: “2018-9-11”,
“Commands”: [
{
“Command”: “open”,
“Target”: “https://a9t9.com/kantu/demo/storeeval”,
“Value”: “”
},
{
“Command”: “store”,
“Target”: “5”,
“Value”: “GLOBAL_counter”
},
{
“Command”: “while”,
“Target”: “${GLOBAL_counter} > 0”,
“Value”: “”
},
{
“Command”: “type”,
“Target”: “name=vehicle”,
“Value”: “bike”
},
{
“Command”: “click”,
“Target”: “name=vehicle”,
“Value”: “”
},
{
“Command”: “type”,
“Target”: “name=vehicle”,
“Value”: “bike”
},
{
“Command”: “click”,
“Target”: “name=vehicle”,
“Value”: “”
},
{
“Command”: “storeEval”,
“Target”: “${GLOBAL_counter} - 1”,
“Value”: “GLOBAL_counter”
},
{
“Command”: “endWhile”,
“Target”: “”,
“Value”: “”
}
]
}

But for future questions: please be more direct and provide exact single question and all helping info to support that question.


If unexpected token in code then code will be wiped from Source View