Inspection in Youtube Playback Window - inspection

I'm a beginner for selenium.
I want to know how to inspect the quality of a video like(144p,240p,720p..) in settings button in youtube playback.

Press f12 and right click on the element you want to select, select copy xpath. Following is the xpath for the settings option and child it has respectively
//*[#id="movie_player"]/div[25]/div[2]/div[2]/button[3]
document.querySelector("#ytp-id-21")

Related

how to customise elementor functionality(how do I find the right bit of code?)

I'm trying to make a web page formatted similar to that of Netflix. Where a list of videos are displayed in a div with two arrows in either direction on each side. When the number of videos are more than the width of the window clicking the arrows moves the displayed videos in the corresponding direction by one video.
And(key part), when a video is clicked, the clicked video gets displayed on another div(main part of the screen) with a text of introduction and an excerpt of the video playing in the background of that section, plus a "play" button to start the video.
I would probably be able to sort it out with vanilla code. But this page is managed by WordPress so I would have to plug in my code with wordpress.
My assumption is that hacking the existing elementor code for the video widget would be the quickest way to do it. But I don't know how to find the code corresponding to the functionality I need to modify to customize it to do what I want. I can locate the video-widget file, but still, it's a huge file with lots of code. How do I find the functionality I need specifically to import into my own code?
Thank you and sorry for the verbose phrasing.

How to link (not embed) a YouTube video so that it starts in theater mode instead of mini or full screen?

Google is filled with answers to "how to modify a youtube link so that it opens in full screen" or "modifying a youtube link to start at a specific time". But how do I modify a link such that it specifically starts with the theater mode?
I am building a chrome extension for my site that detects a click and if the clicked link points to a youtube url, it will opens a mini chrome window (smaller than the main chrome window) that starts playing the video, just like a popup window. Now I don't want to embed the video as embedding has a few restrictions, so I would prefer it this way.
Why do I want theater mode instead of full screen? That's because while on full screen (inside the popped up window) you won't be able to view any comments or other details. Youtube won't let you scroll down while in full screen mode if the url is modified in such a manner.
So how do I achieve this theater mode by editing the link from the beginning?
Add the following to the end of the link:
&mode=theatre
For instance: https://www.youtube.com/watch?v=XqZsoesa55w&mode=theatre

selecting item from context-menu after right click

I have a website that i want to crawl but as it is in chinese i have to firsttraslate it to english and then crawl for which i want the script to right click and open the context menu and then select translate to english. my script is able to right click and open the context menu but not able to select the translate to english option
i have used selenium webdriver for chrome along with python3.7 and have written the code accordingly for right clicking and opening the context menu but stuck on selecting the option translate to english
path_to_chromedriver = 'C:/Users/Administrator/AppData/Local/Programs/Python/Python37-32/chromedriver_new.exe'
driver =webdriver.Chrome(path_to_chromedriver)
driver.get("https://tmall.com")
your_link = driver.find_element_by_xpath('//*[#id="header"]/div/div/div/div[1]')
actionChains = ActionChains(driver)
actionChains.context_click(your_link).perform()
i expect the output to click the option translate to english from context menu
Try simulating pressing the UP key several times (in my context menu it is 4th from the bottom in order to reach "Translate to English"):
actionChains.context_click(your_link).key_down(Keys.UP).key_up(Keys.UP).key_down(Keys.UP).key_up(Keys.UP).key_down(Keys.UP).key_up(Keys.UP).key_down(Keys.UP).key_up(Keys.UP).key_down(Keys.RETURN).key_up(Keys.RETURN).perform()

how to add a right click context menu just on youtube videos by using a chrome extension program

I've searched and searched and searched for a solution to this but every source I found didn't works.
I know the very basics of Chrome extensions and I made a context menu. However, now I'm looking to make one that involves a context menu which works on youtube video.
Let's say when you watch a youtube video and right-click upside of the video , you see the context menu that I want to add.
How can I do this?

Bootstrap modal with youtube bug after hide on hover elements

I use modal on my website to display youtube videos and all is working good.
But, when I start a video (then I stop it) and I close the modal, I have strange effects on my main menu that has a hover changing effects.
This is a sample video:
And then after closing and go with the mouse hover the menu this appears (on the 2 links that are "under" the modal):
Any ideas how to fix this bug?
Additional info
I am on Chrome and I have used a code very similar to the default example (http://twitter.github.io/bootstrap/javascript.html#modals).
Fixed, putting
?wmode=opaque
at the end of the youtube url.

Resources