[SOLVED] Как положить he.GetAttribute("innerhtml") в переменную в C# коде?

Protey

Client
Регистрация
09.01.2016
Сообщения
208
Благодарностей
29
Баллы
28
Народ подскажите как значение из string attribute = he.GetAttribute("innerhtml") положить в переменную project.Variables["info"].Value чет не смог найти через гугляндию?
Код:
HtmlElement he = instance.ActiveTab.FindElementByAttribute("div", "innerhtml", "(?<=Было\\ собрано:\\ ).*(?=\\ <span\\ class=\"ic-sheet2\"></span>!)", "regexp", 2);
if (he.IsVoid) return -1;
string attribute = he.GetAttribute("innerhtml");
 

evgen_po

Client
Регистрация
27.08.2013
Сообщения
848
Благодарностей
528
Баллы
93
  1. HtmlElement he = instance.ActiveTab.FindElementByAttribute("div", "innerhtml", "(?<=Было\\ собрано:\\ ).*(?=\\ <span\\ class=\"ic-sheet2\"></span>!)", "regexp", 2);
  2. if (he.IsVoid) return -1;
  3. string attribute = he.GetAttribute("innerhtml");
  4. project.Variables["info"].Value = attribute;
 
  • Спасибо
Реакции: Protey

Protey

Client
Регистрация
09.01.2016
Сообщения
208
Благодарностей
29
Баллы
28

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)