Selenium Webdriver中未更新名称

时间:2017-11-23 04:51:29

标签: javascript selenium selenium-webdriver

我想在Pixel Tracking选项卡中更新Box Name,请参阅First Image。

预期结果 编辑后,更新的名称应显示在像素跟踪选项卡

实际结果 编辑后,名称未更新并重定向到倒计时选项卡

First Image

Edit Box

After Click on Update Button, page should automatically redirect to Pixel Tracking Tab, but unfortunately it goes to CountDown Tab also name is not getting updated

HTML Image for Update Button

代码编辑按钮单击“像素选项卡”

  new WebDriverWait(driver, 20).until(ExpectedConditions.elementToBeClickable(By.xpath("//div[@id='tbl_list_pixels_js']/div[2]/table/tbody/div[1]/div/div[3]/div[2]/div/a[4]/i")));
   WebElement edit = driver.findElement(By.xpath("//div[@id='tbl_list_pixels_js']/div[2]/table/tbody/div[1]/div/div[3]/div[2]/div/a[4]/i"));
   ((JavascriptExecutor) driver).executeScript("arguments[0].click();", edit);

点击保存代码

     new WebDriverWait(driver, 50).until(ExpectedConditions.elementToBeClickable(By.id("edit_pixel_tracking_redirect_url"))).sendKeys("http://www.google.com");
WebElement Save_pt = driver.findElement(By.id("btnEditCampaign"));
((JavascriptExecutor) driver).executeScript("arguments[0].click();", Save_pt);

0 个答案:

没有答案