Answer the question
In order to leave comments, you need to log in
Is it possible to get the coordinates and dimensions of a flash element on a page?
There is a certain page (it doesn't matter, any) on which the rectangle of the flash element is displayed. It is necessary to determine its coordinates and dimensions. Are there modules in python that allow you to get such information from the loaded page? If possible with examples. )
Answer the question
In order to leave comments, you need to log in
In general, I found a solution, I'll leave it here, maybe it will be useful to someone else:
from selenium import webdriver
op = webdriver.ChromeOptions()
op.binary_location = 'Opera/launcher.exe' # путь к экзешнику оперы
browser = webdriver.Opera( options = op )
browser.get( 'https://site.com/page' )
coords = browser.execute_script( 'return some_id.getBoundingClientRect()' )
print( coords )
browser.quit()
If you have access to JavaScript, you can use getBoundingClientRect
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question