日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

[Selenium]如何實現上傳本地文件

系統 1990 0
      public void uploadLocalFileToServer(String uploadFileName){

		String AutomationPath = System.getProperty("user.dir");

		String filePath=AutomationPath+"\\src\\test\\resources\\testData\\"+uploadFileName;

		logger.info("Upload file path : "+filePath);

		WebElement magnifyIcon = page.getMagnifyIconOfSampleReport();

		magnifyIcon.sendKeys(filePath);

		Assert.assertEquals(page.getSampleReportTxtInput().getAttribute("value"),uploadFileName,uploadFileName+" should be listed in Sample Report .");

		Assert.assertTrue(page.getSampleReportDeleteIcon().isDisplayed(), uploadFileName+" should be listed in Sample Report with a delete icon on the right.");

	}


    

?

      public WebElement getMagnifyIconOfSampleReport(){

		return SeleniumUtil.waitForElementPresent(driver, By.cssSelector("div#tmpmgrDiv div.upsmpbtnc a#upSmp.filea input.file"));

	}


    

?

[Selenium]如何實現上傳本地文件


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦!!!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 荣昌县| 宜宾县| 宁国市| 星子县| 鸡西市| 安丘市| 韩城市| 西吉县| 仁布县| 合水县| 定州市| 临潭县| 上饶市| 维西| 沁阳市| 丽水市| 皮山县| 宜春市| 肃北| 久治县| 宜丰县| 孝昌县| 理塘县| 保定市| 松江区| 兖州市| 永仁县| 酉阳| 广灵县| 兴城市| 河南省| 和平区| 乌海市| 洪泽县| 昌邑市| 南涧| 沾化县| 北票市| 姚安县| 杭锦旗| 分宜县|