P
P
Pavel Ryabov2019-08-12 22:01:49
Python
Pavel Ryabov, 2019-08-12 22:01:49

How to select an element in Selenium from a list?

There is a list element (li), you need to click on it

<li id="l_pr" class=""><a href="https://vk.com/32444224224" onclick="return nav.go(this, event, {noback: true, params: {_ref: 'left_nav'}});" class="left_row">
    <span class="left_fixer">
      <span class="left_count_wrap fl_r left_void"><span class="inl_bl left_count_sign">0</span></span>
      <span class="left_icon fl_l"></span>
      <span class="left_label inl_bl">Моя страница</span>
    </span>
  </a>
  <div class="left_settings" onclick="menuSettings(0)">
  <div class="left_settings_inner"></div>
</div>
</li>

But what to cling to is not clear. I tried for id, and for xpath, and for the text in the link - it doesn't work.
Please tell me how to click on this link. Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Eugene Chefranov, 2019-08-12
@SkayMark

XPath.//*[@id='l_pr']/a

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question