bamboo - How to upload file without clicking on the upload button( upload button not starting with <input> tag) using Selenium Webdriver.? -


while running through bamboo(ci), script getting failed "upload file link" not starting input tag. using auto uploading file working fine locally , when trying run through bamboo on remote machine getting failed there.

so want upload file back-end don't want click upload button.

sendkeys() tried not helpful in scenario.

thnaks in advance

why can't try this.. webpage has browse button locator file? if yes, pass element locatorupload para , pass upload button element locatorbutton

public void uploadfile(by locatorupload, locatorbutton, string filepath){          driver.findelement(locatorupload).sendkeys(filepath);         waitforelementclickable(driver, locatorbutton, 4);         driver.findelement(locatorbutton).click();      }  public void waitforelementclickable(webdriver driver, locator, integer timeoutinseconds){     webdriverwait wait = new webdriverwait(driver, timeoutinseconds);     wait.until(expectedconditions.elementtobeclickable(locator)); } 

Comments

Popular posts from this blog

javascript - Google App Script ContentService downloadAsFile not working -

javascript - Function overwritting -

php - Find a regex to take part of Email -