Quantcast
Channel: Active questions tagged selenium - Stack Overflow
Viewing all articles
Browse latest Browse all 99407

Chrome download pause/resume control not clickable from selenium in java

$
0
0
<div id="safe" class="controls" hidden="[[isDangerous_]]">
  <a is="action-link" id="show" on-click="onShowTap_" hidden="[[!completelyOnDisk_]]" focus-row-control="" focus-type="show">Show in folder</a>
  <template is="dom-if" if="[[data.retry]]">
    <paper-button class="action-button" on-click="onRetryTap_" focus-row-control="" focus-type="retry">
      Retry
    </paper-button>
  </template>
  <template is="dom-if" if="[[pauseOrResumeText_]]">
    <paper-button on-click="onPauseOrResumeTap_" id="pauseOrResume" focus-row-control="" focus-type="pauseOrResume">
      [[pauseOrResumeText_]]
    </paper-button>
  </template>
  <template is="dom-if" if="[[showCancel_]]">
    <paper-button on-click="onCancelTap_" focus-row-control="" focus-type="cancel">
      Cancel
    </paper-button>
  </template>
  <span id="controlled-by"></span>
</div>

This is the chrome://downloads code, i want to do pause or resume using selenium web driver in java.

wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath("//*[@id=\"pauseOrResume\"]")));   
                WebElement pauseOrResume = driver.findElement(By.xpath("//*[@id=\"pauseOrResume\"]"));
                pauseOrResume.click();

This is the selenium code to click pause or resume but got timeout exception as unable to find the element via selenium web driver.

FYI, its not in a iframe but its within a template.

Any suggestions would be appreciated


Viewing all articles
Browse latest Browse all 99407

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>