Uploading of photos doesnt work

Hi everyone,

I try to post something on this Dutch marketplace website:

www.marktplaats.nl

It is an advertising website and you can upload photos onto it. Everything is fine, until i come to the phase of uploading of the photo.

  • status]

Playing macro gfy

  • [info]

Executing: | open | https://www.marktplaats.nl/plaats/728/730?bucketId=181&title=flightcase | |

  • [info]

Executing: | click | id=html5_6e3o0u1hrt2ntrv1f1o60k12u65 | |

  • [error]

timeout reached when looking for element ‘id=html5_1e1o0u1ckb2nijv1v1o60k12u44’

  • [info]

Macro failed (Runtime 13.10s)

Then i get an error message:

RuntimeError: element INPUT specified by ID:html5_html5_6e3o0u1hrt2ntrv1f1o60k12u65 was not found, line: 3

This is the JSON version:

{
“Name”: “gfy”,
“CreationDate”: “2020-2-23”,
“Commands”: [
{
“Command”: “open”,
“Target”: “https://www.marktplaats.nl/plaats/728/730?bucketId=181&title=flightcase”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “id=html5_6e3o0u1hrt2ntrv1f1o60k12u65”,
“Value”: “”
},
{
“Command”: “type”,
“Target”: “id=html5_6e3o0u1hrt2ntrv1f1o60k12u65”,
“Value”: “C:\fakepath\$_86 (1).jpg”
},
{
“Command”: “click”,
“Target”: “name=price.value”,
“Value”: “”
},
{
“Command”: “type”,
“Target”: “name=price.value”,
“Value”: “5”
},
{
“Command”: “click”,
“Target”: “xpath=//[@id=“js-products”]/div[1]/div/div/div[1]/div[2]/div[1]",
“Value”: “”
},
{
“Command”: “click”,
“Target”: "xpath=//
[@id=“syi-place-ad-button”]/span”,
“Value”: “”
}
]
}

How do i get the image uploaded to this site on automation mode?

If someone wants to look in it, here is how you make an account ( very easy, finished in 30 seconds)

https://www.marktplaats.nl/account/createAccount.html?

Thanks

Kevin

Hi,

Nobody giving an answer?

timeout reached when looking for element ‘id=html5_1e1o0u1ckb2nijv1v1o60k12u44’

Just to clarify: So the problem is that the locator (of TYPE) is not found, because the locator changes after every page load? Then partial ID matching is the solution.

The first idea might be to use:

id=html5_* <= does NOT work, no * supported with the ID locator (Selenium syntax rule)

Unfortunately using the asterisk * does not work with Selenium IDE syntax that UI.Vision RPA uses, too.

The solution is to use the XPath contains command:

xpath=//*[contains(@id,"html5_")]" :point_left: solution

My demo test (different website): You see that with ID I have to use the full ID (“Email” here) but with contains I can just use “Em”.

{
  "Name": "idtest",
  "CreationDate": "2020-3-25",
  "Commands": [
    {
      "Command": "open",
      "Target": "https://ui.vision/contact",
      "Value": ""
    },
    {
      "Command": "type",
      "Target": "id=Email",
      "Value": "Only full ID"
    },
    {
      "Command": "type",
      "Target": "//*[contains(@id,\"Em\")]",
      "Value": "Partial ID works!"
    }
  ]
}

Good suggestion of @Plankton

You can use xpath with 2 different mode too

xpath=//label[starts-with(@id,‘message’)]

xpath=//label[ends-with(@id,‘message’)]

To detect dynamic element

1 Like