I am working on learning Selenium test automation using Java with Eclipse IDE. I am trying to develop my own Xpahts but have Chropath installed on my browser to help with anything I’m not able to figure out on my own. I have run into the following issue a couple of times when trying to interact with a play button. The goal of the test is to navigate to the website’s podcast page, select a podcast, and click the play button. I tried to develop my own xpath and was not able to find anything that worked. I checked the Chropath plugin and get this message:
'It might be a child of svg/pseudo element/comment/iframe from different src. Currently, ChroPath doesn't support them.’
I have not been able to interact with any element beyond the ‘iframe’ element. It looks like the issue may be due to there being 10 matching elements for each element contained within the iframe. I'm not sure why this would be the case as there are only 7 podcast options.
I’ve searched for similar questions and tried the following approaches.
With the ByChained method.
List PodcastPlayButton = driver.findElements(new ByChained(By.xpath("//iframe[@src='https://embed.acast.com/nightmareonfilmstreet/']"), By.xpath("//button[@aria-label='Play']")));
Another approach I tried was using 2 xpaths in sequence, something like this driver.findElement(By.xpath("//ul[@id='menu-bd_mobile-1'] //a[text()='PODCASTS']")).click();
I’ve also tried using a longer xpath to navigate down to the div that I thought would be clickable, like this
driver.findElement(By.xpath("//iframe[@src='https://embed.acast.com/nightmareonfilmstreet']/html/body/div[8]")).click();
This is the podcast webpage that I’m having issues with https://bloody-disgusting.com/podcastnetwork/
Let me know if you need any more information.
Any help is appreciated.
