javascript - How to locate the element using selenium python in the HTML below -


i'm trying automatic test using selenium .but met wired thing can't locate element. tell me how deal this. i've tried this:

driver.find_element_by_xpath('//*[@onclick="addrule"]').click() 

or

driver.find_element_by_css_selector('div.addbutton') 

nothing works..

enter image description here

use

i saw there frame

so first switch frame:

  driver.switch_to_frame("contents")    driver.find_element_by_class_name('addbutton"]').click() 

Comments

Popular posts from this blog

Sort a complex associative array in PHP -

vb.net - How to ignore if a cell is empty nothing -

recursion - Can every recursive algorithm be improved with dynamic programming? -