0

everybody! I am using Firefox browser and Chrome one. I installed FireBug and FirePath to Firefox. I can see html tree in Chrome deeper than in Firefox. I am looking for span values: Chrome

FirePath hellps me to looking for values, cuz it flashs the correct one. So, I can see only this in Firefox:

<ul class="sport--list">
<li class="sport--block">
<li class="sport--block">
<li class="sport--block">
<li class="sport--block">
<div class="sport--head sp--bg sp_2 head--folding folding--open">
<ul class="category--list--block">
<li class="category--block sp_2">
<div class="caterory--head">
<ul class="events--list">
<li>
<div class="event--head-block" style="height: 48px;"/>
</li>
</ul>
</li>

I am not able to go deeper than: <div class="event--head-block" style="height: 48px;"/>

And I use this xpath: driver.FindElement(By.XPath("//ul[@class='sport--list']/li[contains(div/span, 'Теніс')]/ul/li/ul/li/div/div/div/div/span"));

It gives mee this error at Visual Studio:

{"no such element: Unable to locate element: {\"method\":\"xpath\",\"selector\":\"//ul[@class='sport--list']/li[contains(div/span, 'Теніс')]/ul/li/ul/li/div/div/div/div/span\"}\n  (Session info: chrome=66.0.3359.170)\n  (Driver info: chromedriver=2.38.552522 (437e6fbedfa8762dec75e2c5b3ddb86763dc9dcb),platform=Windows NT 10.0.17134 x86_64)"}

How so? I can see full HTML chrome, and I use Chrome driver, anyway my attempts are unsuccessful. I want to get span values and then add them to list. Thanks a lot for your time for me.

The Vee
  • 51
  • 7

0 Answers0