Why does my C# code somtimes not run or work?

  • Автор темы Автор темы Tao Guan
  • Дата начала Дата начала

Tao Guan

Пользователь
Регистрация
24.05.2018
Сообщения
73
Реакции
0
Баллы
6
Why does my C# code somtimes not run or work, but sometime will run normally?
Is there any impovement to always run? Thank you

Код:
Развернуть Свернуть Копировать
HtmlElement he = instance.ActiveTab.MainDocument.FindElementByAttribute("div", "id", project.Variables["tips_current_pick_column"].Value, "text", 0);
if (!he.IsVoid)
{
    he.ScrollIntoView();
   

}
 
Check errors in log, when it does not work.
PM_log.png
 
In this case you should debug your code. Maybe project variable is empty when you execute iit, or element on a webpage does not match.
smth like this.
 

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