1

I am performing automation on a web page, the problem is i cannot locate a web element because it has identical attributes to that of other 20 web elements with similar parents and children, with one dynamicity i.e the id, which changes every time i refresh the page. How do i locate the web element?

enter image description here

    for z in web_elements:
        print(z.get_attribute("innerHTML"))
    width = browser.find_element_by_xpath('//input[contains(@class, "cke_dialog_ui_input_text")]')
    width.click()

I tried searching for the web element using loops no success though

  • can you provide the website link? – ABC Jan 02 '21 at 14:50
  • its my company's website lol can't do that sorry –  Jan 02 '21 at 14:57
  • ummm u said there are other 20 web eles; then i assumed there are 21 similar elements on the page; so is this element alway located at the same posible. i.e. i mean can you do nth-child() to extract that element – ABC Jan 02 '21 at 15:00
  • 1
    I actually found the element rn, but it's not intractable i wanna close this question –  Jan 02 '21 at 15:02
  • You can delete the question. – Booboo Jan 02 '21 at 16:01

0 Answers0