The xpath:
//div[@id='capTypePopup']
you used will find more than one elements,selenium will use the first find element, which may be not the one your expected.
From your screenshot, i noticed there are already two, I guess there should be another one ahead of the div your desired and it's not visible.
Use Dev
tool to test the //div[@id='capTypePopup']
, and confirm the first found div is visible or not.
If not visible, use more strict xpath which can find the div you desired. After that your problem should gone.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…