I'm trying to scrape this page: https://foundation.app/@bryanmarktaylor. The problem I have is how to get the number to the left of the copy to clipboard button below the avatar (0x068C...). When I'm using python selenium webdriver with Chrome, instead of copying the number to the clipboard, the browser shows a prompt alert that says Copy to clipboard: Ctrl+C, Enter and shows a textbox with the number I need.
I cannot inspect the code of the alert to catch the element. I've tried using
alert = driver.switch_to.alert alert.send_keys(Keys.CONTROL, 'c')
But it gives me
TypeError: send_keys() takes 2 positional arguments but 3 were given
I've also tried using a JS script
but it looks like I cannot send the alert element as an argument
TypeError: Object of type Alert is not JSON serializable