malformed url java selenium while using local picture -
so i'm trying upload image using selenium can test functionality of website. have tried various things , have been unable image upload.
i've tried attachfile:
selenium.attachfile("id=upload_field", "c:\\bacon.jpg");
i've tried using driver in below code find element:
webelement uploadimage = driver.findelement(by.xpath("//input[@type='file']")); uploadimage.sendkeys("c:\\bacon.jpg")
i've tried find element button id:
webelement uploadimage = driver.findelement(by.id("upload_button"));
i've tried using click , upload method errors out when use click , tells me should using attachfile. the website uses modal window upload story.
any appreciated.
oh, when use attachfile error:
com.thoughtworks.selenium.seleniumexception: malformed url:c:\bacon.jpg
Comments
Post a Comment