I am trying to join a whatsapp group using desktop web whatsapp (chrome, ubuntu). When I click on Join Group, It shows dialogue below.I want to remove this dialogue forever from chrome. I can join the group by clicking again on join the group after dismissing the xdg-open dialogue.
I tried Reset chrome protocol_handler chrome with no luck.
I also tried to dismiss the dialogue using python selenium with no luck using below code.
try:
WebDriverWait(browser, 3).until(EC.alert_is_present(),
'Timed out waiting for PA creation ' +
'confirmation popup to appear.')
#if it doe
alert = browser.switch_to.alert()
alert.accept()
print "alert accepted"
except TimeoutException:
print "no alert"
pass
Is there a way to dismiss the dialogue using python selenium or using some configuration file changes in chrome installation ?
DESCRIPTION. xdg-open opens a file or URL in the user's preferred application. If a URL is provided the URL will be opened in the user's preferred web browser. If a file is provided the file will be opened in the preferred application for files of that type.
xdg-open command in the Linux system is used to open a file or URL in the user's preferred application. The URL will be opened in the user's preferred web browser if a URL is provided. The file will be opened in the preferred application for files of that type if a file is provided.
Here is the official documentation (https://support.google.com/chrome/a/answer/7532419) on how to do it.
@Eyal's answer is pretty close. Instead you should set the URLBlocklist
field.
sudo mkdir -p /etc/opt/chrome/policies/managed
cd /etc/opt/chrome/policies/managed
jq -n '.URLBlocklist=["whatsapp://*"]' | sudo tee blocklist.json
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With