Click Google Chrome Link failed to find xpath on eBay, Poshmark, and Mercari

Hi everyone!

I'm new at this. I am running on KM Version 9.0.2 and macOS Sierra 10.12.6.

I just recently purchased a course on how to automatically list to eBay, Poshmark, and Mercari. I am trying to achieve this same outcome: https://drive.google.com/file/d/10XsoKE7XemmZfhFQZvYE_zWlDhONZRJB/view?usp=sharing

I was able to figure out how to do step 1, which is to insert the date and copy the data from the cells to the right of it on a Google Sheet into different named clipboards. You can test it out yourself on this example spreadsheet with this macro I have created: https://drive.google.com/file/d/1ftF4E8RcwGvdnfYTdEP7Fhu7C8cCEa0a/view?usp=sharing
01. Copy Item Specifics.kmmacros (7.5 KB)

However, I am having an issue with the next step which is copying all the data from the different named clipboards into their respective fields. I have tried many times by copying the xpath and full xpath and pasting it into the "Click Google Chrome Link" field to paste the data into the desired field on the web, but it is not working on eBay, Poshmark or Mercari.


38%20PM
48%20PM
I keep getting this error notification:
18%20PM

However, when I do the exact same thing on Google Search, (copying the xpath on the search bar), it works. Here's the macro for that: List on Google.kmmacros (3.1 KB)

I am confused! What am I doing wrong and how can I fix it? I want to be able to achieve everything in the video up above. Any help would be greatly appreciated. Thanks!

Some web sites use dynamic HTML IDs and class names, so any XPath that relies on a specific names won't work. :wink:

I rarely use XPaths since I find them so complex. Instead I use querySelector in a Execute a JavaScript in Browser action.

If you'd like help with this, please post the URL of the target page.

Hi Michael,

Thanks for the information. How would I go about using the querySelector?

Here's the URL of the target page: https://bulksell.ebay.com/ws/eBayISAPI.dll?SingleList&&DraftURL=https://www.ebay.com/sh/lst/drafts&ReturnURL=https://www.ebay.com/sh/lst/active

The link is the URL to post a listing on eBay. But I'm assuming you would need to login? Would we get different results since we would have 2 different accounts?

If so, maybe Poshmark would be a better target page? The URL looks a bit more generic, but still requires a login: https://poshmark.com/create-listing?login=true

Let me know if this is sufficient or what else I can do? Thanks.

Even though I used your URL, I am getting a different page than you:

image

Are you using the eBay "Business tool"?

I did a Chrome Inspect of this field and the HTML looks completely different from your above screenshot.

So, just looking at the HTML in your screenshot, I developed this JavaScript:

inputElem = document.querySelector('div.search-bar input');
inputElem.value = "TEST"

Before I go any further, please put this script in the Chrome JavaScript Console (after inspecting your page) and test it. If it does set the field on the web page to "TEST", then it should work.
Let us know the results.

Sorry! I did provide the wrong URL -- it was to the following page after you click "Get Started" and fill out all of the details. This is the correct URL: https://bulksell.ebay.com/ws/eBayISAPI.dll?SingleList&ReturnURL=https%3A%2F%2Fwww.ebay.com%2Fsh%2Flst%2Factive

I was able to get the field on the web page to display "TEST". Here's a video of it: https://drive.google.com/file/d/1yNhdi9k9RsMKL7wKKGn6cS9f9PP1IKj9/view?usp=sharing

Where do I go from here?

Before I go any further, please put this script in the Chrome JavaScript Console (after inspecting your page) and test it. If it does set the field on the web page to "TEST", then it should work.
Let us know the results.

What do I do next? How do I go about automating this into a macro?

Thanks all for your responses. i was having similar questions and your answers were helpful to me.

OK, first you should use KM Variables instead of Named Clipboards.
So, change the last Action of your macro "Copy Item Specifics" to this:

image

Now, in your "List on eBay" macro, after you have opened the eBay URL, run this JavaScript in a Execute a JavaScript in Front Browser action:

var inputElem = document.querySelector('div.search-bar input');
inputElem.value = document.kmvar.eBay_Title;


var goBtn = document.querySelector('div.search-bar button.btn.btn--primary');
goBtn.click();

NOTE: This is a very complicated form, and without the actual page I can't properly test.
The URL you provided results in a different page for me than for you -- probably due to some eBay settings you have.

In particular when you enter an item to search for, it must find a match before the "Go" button can be clicked.

If you still need help, then please upload your "List on eBay" macro so I can use to test and modify.

I was also stuck at some point when I was doing to try Poshmark Pro Tools. Then my colleague helped me to sort out this one. I hope things would have cleared for you buddy.