-1

I have a path:

<div class="jss601 jss602 jss581" aria-pressed="false" tabindex="0" role="button" aria-haspopup="true" xpath="1"><span></span></div>

but I could not write the XPath or CSS for clicking the element. Could you please help me?

This is a dropdown list called as "Tip" how can I manage the selection because it is not a select so I could not use the select function:

HTML:

<ul class="MuiList-root-139 MuiList-padding-140" role="listbox" xpath="1">
    <li tabindex="-1" class="MuiButtonBase-root-55 MuiListItem-root-143 MuiListItem-default-146 MuiListItem-gutters-150 MuiListItem-button-151 MuiMenuItem-root-296" role="option" data-value="">Hiçbiri
        <span class="MuiTouchRipple-root-64"></span>
    </li>
    <li tabindex="-1" class="MuiButtonBase-root-55 MuiListItem-root-143 MuiListItem-default-146 MuiListItem-gutters-150 MuiListItem-button-151 MuiMenuItem-root-296" role="option" data-value="RTU">RTU
        <span class="MuiTouchRipple-root-64"></span>
    </li>
    <li tabindex="0" class="MuiButtonBase-root-55 MuiListItem-root-143 MuiListItem-default-146 MuiListItem-gutters-150 MuiListItem-button-151 MuiMenuItem-root-296 MuiMenuItem-selected-297" role="option" data-value="Substation Control System">Substation Control System
        <span class="MuiTouchRipple-root-64"></span>
    </li>
    <li tabindex="-1" class="MuiButtonBase-root-55 MuiListItem-root-143 MuiListItem-default-146 MuiListItem-gutters-150 MuiListItem-button-151 MuiMenuItem-root-296" role="option" data-value="Control Center">Control Center
        <span class="MuiTouchRipple-root-64"></span>
    </li>
    <li tabindex="-1" class="MuiButtonBase-root-55 MuiListItem-root-143 MuiListItem-default-146 MuiListItem-gutters-150 MuiListItem-button-151 MuiMenuItem-root-296" role="option" data-value="IED">IED
        <span class="MuiTouchRipple-root-64"></span>
    </li>
</ul>

<li tabindex="-1" class="MuiButtonBase-root-55 MuiListItem-root-143 MuiListItem-default-146 MuiListItem-gutters-150 MuiListItem-button-151 MuiMenuItem-root-296" role="option" data-value="RTU" xpath="1">RTU
    <span class="MuiTouchRipple-root-64"></span>
</li>
Subburaj
  • 2,294
  • 3
  • 20
  • 37
  • How is the `
    ` related to `
      ` and `
    • `? Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the [How to Ask](https://stackoverflow.com/help/how-to-ask) page for help clarifying this question.
    – undetected Selenium Aug 06 '18 at 13:57

1 Answers1

0

Here you can find a dropdown example and how find a element in this dropdown.

Selenium - Python - drop-down menu option value

k_pedron
  • 57
  • 1
  • 10