mercredi 20 juillet 2016

How get value from this code by using Selenium?

I want this value 201607000044 to string from this code -

<SPAN id=ctl00_ctl00_ctl00_ctl00_ContentPlaceHolderCenter_ContentPlaceHolderBody_ContentPlaceHolderBody_ContentPlaceHolderBody_txtNumber class=inputBold style="WIDTH: 200px; DISPLAY: inline-block">201607000044</SPAN>

Because this is not working -

IWebElement notificationNumberElement = FindElementById("ctl00_ctl00_ctl00_ctl00_ContentPlaceHolderCenter_ContentPlaceHolderBody_ContentPlaceHolderBody_ContentPlaceHolderBody_txtNumber");
        string notificationNumber = notificationNumberElement.GetAttribute("value");

Aucun commentaire:

Enregistrer un commentaire