python - Why is selenium giving NoSuchElementException when element definitely exists -


i'm having problem selenium giving me nosuchelementexception when element exists without doubt.

below 1 example doesn't find element , times out. know element given id exists because can see in source while program running reason selenium can't find it. doesn't throw error in case same problem elsewhere in code throw errors.

i have tried using xpath instead of id using implicit waits before trying find still doesn't work.

def waitforload(id):     checktime = 0     while true:         try:             x = webdriver.find_element_by_id(id)             return true         except:             time.sleep(0.5)             checktime += 0.5             print(checktime)             if checktime > timeout:                 return false 

known issues:

1.iframe
2.even if element have id, must unique, engines can generate 2 or more elements same id. check that!
3.maybe element have hidden clone if input etc. also, check that!


Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -