Hey Sudha, you can use following code to handle confirmation alert popup using Python webdriver:
from selenium import webdriver
import time
driver = webdriver.Firefox()
driver.maximize_window()
driver.get(url)
#Switch the control to the Alert window
obj = driver.switch_to.alert
#Retrieve the message on the Alert window
message=obj.text
print ("Alert shows following message: "+ message )
time.sleep(2)
#use the accept() method to accept the alert
obj.accept()
# Or Dismiss the Alert using
obj.dismiss()
driver.close
I am sure this helped to answer your query, cheers!
For more, join this course to Master Python programming.
Thanks!