How to delete Pop window items in Appium Python

Hi All, I am trying to Automating contacts call history. I am trying to delete the recently made call but i am not able to get the locator for delete option. Someone please help me.

This is my code
from appium import webdriver
from appium.webdriver.common.appiumby import AppiumBy
from appium.webdriver.common.touch_action import TouchAction
from selenium.webdriver import ActionChains

from selenium.webdriver.common.by import By
import time

desired_cap = dict(

platformName="Android",
platformVersion="11",
deviceName="1234567",
appPackage="com.google.android.dialer",
appActivity=".extensions.GoogleDialtactsActivity t224"

)

driver = webdriver.Remote(“http://127.0.0.1:4723/wd/hub”, desired_cap)
driver.find_element(By.XPATH, “//android.widget.FrameLayout[@content-desc=‘Recent’]/android.widget.FrameLayout/android.widget.ImageView”).click()
ele = driver.find_element(By.XPATH, “//android.widget.TextView[@bounds=’[126,266][340,330]’]”)
actions = ActionChains(driver)
actions.click_and_hold(ele)
actions.perform()

driver.find_elements(By.XPATH, “//android.widget.TextView”)[4].click()

driver.find_element(By.XPATH, “//android.widget.TextView[@text=‘Delete’]”).click()

driver.set_value(popUp, ‘Delete’)

I tried all the 3 locators strategy but no help. Attached images also kindly check it.

xpath2

its web element not native element

I am able resolve it by above code. its woking fine now. I just added some time before the above step.