To put the file name into the file upload dialog box with Capybara we can use the following Selenium webdriver method. We can use the Ruby code Dir.pwd to get the current working directory path.
page.driver.browser.find_element(:id, "fileUploadId").send_keys
(Dir.pwd + "file upload path")
No comments:
Post a Comment