2

We're using the

  new FlashPolicyHelper(driver).addSite("https://your.site")

In order to bypass the getFlash prompt when trying to navigate to our websites that use Flash.

However this does not seem to work when executed remotely.

Current Implementation

Calling the FlashPolicyHelper Class

if(browser.driver instanceof ChromeDriver)
    {
      new FlashPolicyHelper((ChromeDriver) browser.driver).addSite(odysseyURL)
    }
    browser


public class FlashPolicyHelper
{
private final ChromeDriver driver;

public FlashPolicyHelper(ChromeDriver driver) {
    this.driver = driver;
}

public FlashPolicyHelper addSite(String site) {
    try {
        this.driver.get("chrome://settings/content/siteDetails?site=" + site);
... rest of code for FlashPolicyHelper found here...

https://stackoverflow.com/questions/52185371/allow-flash-content-in-chrome-69-running-via-chromedriver

3

1 Answer 1

1

I realized I needed to instantiate a Remote Web Driver in order to obtain functionality remotely. Solved.

if(browser.driver instanceof RemoteWebDriver)
{
  new FlashPolicyHelper((RemoteWebDriver) browser.driver).addSite(odysseyURL)
}
browser


public class FlashPolicyHelper
{
private final RemoteWebDriver driver;

public FlashPolicyHelper(RemoteWebDriver driver) {
this.driver = driver;
}

public FlashPolicyHelper addSite(String site) {
try {
    this.driver.get("chrome://settings/content/siteDetails?site=" + site);
... rest of code for FlashPolicyHelper found here...

https://stackoverflow.com/questions/52185371/allow-flash-content-in-chrome-69-running-via-chromedriver

2
  • For the sake of anyone else who runs into this kind of problem, could you please edit your answer to include the code that solved your problem?
    – Kate Paulk
    Jan 21, 2020 at 12:46
  • Can do @KatePaulk Jan 22, 2020 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.