Handling Contents Of Embed Tag In Selenium Python
How can I access embedded part from web page and contents using selenium and python
Solution 1:
I am able to access the elements in an <embed>
block by switching frame to <embed>
element.
driver.switch_to.frame(driver.find_element(By.CSS_SELECTOR, 'body > embed'))
Here, 'body > embed'
is selector for <embed>
element.
Solution 2:
You cannot.
The <embed>
element creates an embedded panel in which a third-party
application can run. In other words: it is outside of the DOM. Selenium is able to operate only on items in the browser's DOM.
You will need to access this third-party application using some other means. AutoIT or Sikuli are popular options.
Post a Comment for "Handling Contents Of Embed Tag In Selenium Python"