1

one more problem i hv,i asked similar question earlier and i tried that method but not able use that methon in this problem so pls help me. it's element html code is - Filters 

So basically, question is that there is one button its kind of toggle button and i want click on that button to select device like Desktop, Tablet & Mobile all check boxes are already (default) selected now i have to uncheck or deselect device, to do this, first i have to click on that toggle button , when i click on toggle button its id (gwt-uid-598) 598 is getting changed every time or every refresh. Can you pls help me, what should or which method should i follow in this case.

i am using below python code.

Click on device Filters

elem = driver.find_element_by_xpath('//*[@id="gwt-uid-598"]/div/div/span') elem.click()

Thanks in advance.

Community
  • 1
  • 1

1 Answers1

0

Good question.

Try to use another selector, for example: css class or use xpath method contains().

Example: //div[contains(text(), "checkbox")]

I can help you if you can provide source code of the page or needed element.

Oleksandr Makarenko
  • 779
  • 1
  • 6
  • 18