1

What I'm trying to do is turn the Flash setting from 'Block' to 'Allow' in the chrome settings page mentioned below. I looked up the xpath for the sel drop down option for Flash to run the Webdriver code but it doesn't select the element at all.

WebDriver driver = new ChromeDriver();
String flashURL = "chrome://settings/content/siteDetails?site=https%3A%2F%2Fwww.xfinity.com";

driver.manage().window().maximize();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

driver.get(flashURL);

//copy the xpath for Flash sel drop down: //*[@id="permission"]

WebElement flash = driver.findElement(By.xpath("//*[@id="permission"]"));
flash.click();

When I run the program, I get the error saying web element was not found.

I'm on Chrome 78 and have the appropriate chromedriver installed.

  • Hope this might help you. https://stackoverflow.com/questions/52185371/allow-flash-content-in-chrome-69-running-via-chromedriver – kwishna Nov 18 '19 at 18:57
  • Welcome to SO. Please take the time to read [ask] and [mcve]. It will help you craft solid questions that will hopefully get useful answers. Are you trying to access a flash element with webdriver? If so, that's not supported. – orde Nov 19 '19 at 02:33
  • Will do better orde. And Kwishna, that really helped a lot! I wanted to upvote the answer or comment to give him kudos but I'm too new – Mayank Yadav Nov 20 '19 at 19:01

1 Answers1

1

With the help of Kwishna in comments I got this answer. Allow Flash content in Chrome 69 running via chromedriver Looks like Johno Crawford gave a reply that will help any one trying to turn on Flash by default.