YT Button

marcos16

New Member
VIP
Joined
Nov 30, 2020
Messages
2
Reaction score
0
Achievement
Hello, I need help about that two buttons in youtube: ''No thanks'' and ''I agree''
Captura de pantalla 2020-12-13 221046.pngCaptura de pantalla 2020-12-13 221056.png
For the first one I have this code:

await ClickByClass("style-scope yt-button-renderer style-text size-small");

But for the second one I don't know what to write, because class and id doesn't work for me. Could someone give me a hand? Thanks in advance.
 

marcos16

New Member
VIP
Joined
Nov 30, 2020
Messages
2
Reaction score
0
Achievement
Thanks for your quick response. I tried used xpath too but it isn't working. This is the code I'm using for the ''I agree'' button:

await ClickByXpath("/html/body/div/c-wiz/div[2]/div/div/div/div/div[2]/form/div/span/span");

However, the xpath code for the ''No thanks'' button works flawlessly:

await ClickByXpath("/html/body/ytd-app/ytd-popup-container/paper-dialog/yt-upsell-dialog-renderer/div/div[3]/div[1]/yt-button-renderer/a/paper-button/yt-formatted-string");

So I don't really know where's the problem, I don't know what I'm doing wrong.
 

Younghusband

New Member
Premium
Joined
Dec 10, 2020
Messages
1
Reaction score
0
Achievement
I can't solve the problem, is it possible to get a more detailed solution please?
 

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu