'locateOnScreen cannot scan on facebook and youtube

I have tried locateOnScreen command in al the ways.It is working propperly. But inside facebook and youtube, it cannot scan. please help me! Please let me know if there any security bypass that I can try.

import pyautogui import time

time.sleep(3)

pyautogui.click(pyautogui.locateOnScreen('confirm.png'))



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source