Xpath help needed for file upload on WeTransfer.com

Can anyone help me please to specify a xpath to use with click to open the file upload dialog on https://WeTransfer.com ? If have tried so far:

“xpath=/html/body/div[2]/div/div/div/div/div/div/div/h2”,
“xpath=//h2”,
“css=body > div.root-node > div > div.transfer > div > div.scrollable.transfer__contents > div.scrollable__content > div.uploader__files > div > h2”

I am not really good at XPath selectors, maybe @newuserkantu or others can help here. Maybe they even added some “anti-xpath” obfuscation code to prevent automation by tools like Selenium or Puppeteer?

If had to automate the file upload on this page I would go “go visual” and use XClick. With that, I found a working solution in less than a minute :slight_smile:

This works:

1 Like

I love simple, fast and efficient solutions (I do not like desktop automation because require xmodules and focus on screen)

I use 20 different addons to detect xpaths, ui vision detect 10% of xpaths available only.

For your case the solution is simple this is the best xpath to open the upload menu

{
“Name”: “Open”,
“CreationDate”: “2021-3-10”,
“Commands”: [
{
“Command”: “bringBrowserToForeground”,
“Target”: “”,
“Value”: “”
},
{
“Command”: “click”,
“Target”: “xpath=//div[@class=‘uploader__empty-state uploader__empty-state–with-directories-selector’]”,
“Value”: “”
}
]