2017-09-18 4 views
1

これはリンクです: "https://uploadfiles.io/" このリンクではファイルをアップロードします。私はSeleniumを実行するので、AutoITとsikuliを使用することはできません。セレンのsetFileDetectorメソッドを使用する必要があります。しかし、上記のリンクのHTMLをチェックすると入力フィールドがないので、どのようにファイルをローカルにアップロードすることもできます。Seleniumグリッドに入力フィールドがない場合、Seleniumを使用してファイルをアップロードする方法

+0

あなたはRobotクラスを使用することができます。 https://stackoverflow.com/questions/45711632/how-to-select-file-in-selenium-webdriver-from-local-machine-from-window-popup-wiとhttps://stackoverflow.comの可能な複製/ questions/16896685/how-to-upload-file-using-selenium-webdriver-in-java – swati

答えて

0

あなたはcombine Sikuli and Selenium(またはセレン及びKantu file uploads

// Create a new instance of the Firefox driver 
WebDriver driver = new FirefoxDriver(); 
// And now use this to visit Google 
driver.get("http://www.google.com"); 
//Create and initialize an instance of Screen object 
Screen screen = new Screen(); 
//Add image path 
Pattern image = new Pattern("C:\\searchButton.png"); 
関連する問題