U
U
U_n_d_e_r2021-03-08 11:55:01
C++ / C#
U_n_d_e_r, 2021-03-08 11:55:01

How to read page fragment using Selenium?

Good afternoon!
There is a page with this code:

<a href="/ru/game/" class="nav-submenu_link">ИГРА<span class="nav-submenu_arrow js-mainmenu-arrow"> </span></a>

How and in what way can the inscription "Game" and the inscription "nav-submenu_link" be read?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Evgeniy _, 2021-03-08
@GeneD88

driver.FindElement(By.Xpath("//a[@href = '/ru/game']")).getAttribute("value");
driver.FindElement(By.Xpath("//a[@href = '/ru/game']")).Text

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question