Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 67441

Get InnerText using Coypu and C#

$
0
0

I have the following HTML:

<h1 _ngcontent-ng-cli-universal-c8="" class="title" id="greetingsLabel1"> Welkom, <span _ngcontent-ng-cli-universal-c8=""></span></h1>

I'm using coypu to find the elements, when I do:

browser.FindId(GreetingsLabel1Path).InnerHTML

I get:

Welkom, <span _ngcontent-ng-cli-universal-c8=""></span>

but I really just want Welkom,. I tried to use InnerText instead of Inner HTML but it doesn't work with InnerText, it gives the message "ElementScope does not contain a definition for InnetText and no accessible extension method 'InnerText' accepting a first argument of type ElementScope could not be found(are you missing a using directive or an assembly reference?)".

Is there any way to get just Welkom, using coypu?


Viewing all articles
Browse latest Browse all 67441

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>