upload files with webdriver and java (control + open)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

upload files with webdriver and java (control + open)

Illusion0Reality
Without using AutoIT, is there way to upload files using driver (java).
I tried step-wise, but failed in the initial step.

Webelement e= Driver.findelement(By.id("AttachFiles"))
e.send_keys (Keys.Control, "o")
My aim is to send a combination of keys in the 1st step.

Later I will upload a file.

Reply | Threaded
Open this post in threaded view
|

Re: upload files with webdriver and java (control + open)

softwaretestingforum
Administrator
You should be able to upload file using -

Driver.findelement(By.id("AttachFiles")).sendKeys("file path")
// Click on upload button
~ seleniumtests.com
Reply | Threaded
Open this post in threaded view
|

Re: upload files with webdriver and java (control + open)

illusion0reality
Thanks, I will try.