How to use clickAt for specific image


#1

Hi,

I’m not sure it’s make any sense with my question title, but I’m little confused and not sure how to ask it properly.

I want use kantu to sell steam item in my inventory, the problem is I have many thing different in inventory. This is come up with same image name, but the full image link is different like below:

https://steamcommunity-a.akamaihd.net/economy/image/1MrIl4MIJ_pNBhReTwBpxJ8G4GM4OekG2V3huqL5LCqk1i0eEBQwwm_zt8cl-xrtvDXIxynVGhd-5BiafXODPlpqEseh9Fmn4SiG6rA/96fx96f

And

https://steamcommunity-a.akamaihd.net/economy/image/1MrIl4MIJ_pNBhReTwBpxJ8G4GM4OekG2V3huqL5LCqk1i0eEBQwwm_zt8cl-xrtvDXIxynVGhd-5BiafXWCP1pqEcqh9Fmn7mQilfI/96fx96f

There are anyway to use click or clickAt to specific image with link target?

I tried use Visual UI Testing, sometime the image not found, sometime the image found, I’m not sure the problem in here. I’ve tried use id to, but the id is dynamic, so I go to: https://a9t9.com/kantu/docs/selenium-ide/click#changingid and check the contains example, after tried it, it’s turn back: error ask is not a function. After take a look, if I tried use dynamic id, it will sell all items in my inventory, so click or clickAt to specific image is the best option for me.

I hope get some help in here and thank so much for all advice.


#2

Can you link to the page that you want to automate? This would clarify things. If that is not possible, a screenshot could be helpful.


#3

Yes, I have the image now.

My idea is click to something have box image and sell it, I tried the macro below:

Example Code

{
“CreationDate”: “2018-8-7”,
“Commands”: [
{
“Command”: “open”,
“Target”: “https://steamcommunity.com/”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “id=steam_parental_password_box”,
“Value”: “”
},
{
“Command”: “type”,
“Target”: “id=steam_parental_password_box”,
“Value”: “xxxx”
},
{
“Command”: “click”,
“Target”: “id=unlock_form”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “//[@id=“submit_btn”]/span",
“Value”: “”
},
{
“Command”: “clickAndWait”,
“Target”: “link=Inventory@POS=2”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: "//
[@id=“578080_2_1916729701642524157”]/a”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “//[@id=“quicksellbtn”]/span[2]",
“Value”: “”
},
{
“Command”: “click”,
“Target”: “link=>”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: "//
[@id=“578080_2_1948256166273947607”]/a”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “//[@id=“quicksellbtn”]/span[2]",
“Value”: “”
},
{
“Command”: “click”,
“Target”: "//
[@id=“578080_2_1948256166273947791”]/a”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “//*[@id=“quicksellbtn”]/span[2]”,
“Value”: “”
}
]
}

Also, there are many crate, so I tried record when in page 1 end, it will go to page 2 with ignoreError, is it possible? I hope it’s enough to have something to continues try it.

After all, thank you so much.