Add C# methods

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 813
Благодарностей
1 188
Баллы
113
Add C# methods to access HTML elements, it is crucial to do that especially in Droid, as I have to make a loop for EVER element in the bot to make sure it does not fail.
There is no such wait for loading options like in zenno, every action should be made with wait for an element before clicking or filling, to do that with default ways it crazy.
 

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 813
Благодарностей
1 188
Баллы
113
VladZen can we please wait for something for this? I mean it's not really that important to get c# but something to navigate to child elements and parent elements would be good, as there is not outer HTML and source code this is not a good way to work.
This should not be something complex for You guys. As I could make something for myself if this is not something You think will be developed.
There is already this
70539

But then I need to make my own methods to navigate through this tree, as it is crazy lol.
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 480
Благодарностей
5 917
Баллы
113
We already have this in API. You need version 2.2.5.0. to use C# methods:
C#:
var droid = instance.DroidInstance;
string source = droid.Hierarchy.GetLayout();

var xmlDocument = new System.Xml.XmlDocument();
xmlDocument.LoadXml(source);
var xmlNode = xmlDocument.DocumentElement.FirstChild;
foreach (System.Xml.XmlAttribute attr in xmlNode.Attributes)
{
    var message = "Name:" + attr.Name + ", Value:" + attr.Value;
    project.SendToLog(message, ZennoLab.InterfacesLibrary.Enums.Log.LogType.Info);
}
 
  • Спасибо
Реакции: lokiys

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 813
Благодарностей
1 188
Баллы
113
We already have this in API. You need version 2.2.5.0. to use C# methods:
C#:
var droid = instance.DroidInstance;
string source = droid.Hierarchy.GetLayout();

var xmlDocument = new System.Xml.XmlDocument();
xmlDocument.LoadXml(source);
var xmlNode = xmlDocument.DocumentElement.FirstChild;
foreach (System.Xml.XmlAttribute attr in xmlNode.Attributes)
{
    var message = "Name:" + attr.Name + ", Value:" + attr.Value;
    project.SendToLog(message, ZennoLab.InterfacesLibrary.Enums.Log.LogType.Info);
}
In userarea latest version is 2.2.4.0
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 480
Благодарностей
5 917
Баллы
113

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 813
Благодарностей
1 188
Баллы
113

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 813
Благодарностей
1 188
Баллы
113

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 813
Благодарностей
1 188
Баллы
113
We already have this in API. You need version 2.2.5.0. to use C# methods:
C#:
var droid = instance.DroidInstance;
string source = droid.Hierarchy.GetLayout();

var xmlDocument = new System.Xml.XmlDocument();
xmlDocument.LoadXml(source);
var xmlNode = xmlDocument.DocumentElement.FirstChild;
foreach (System.Xml.XmlAttribute attr in xmlNode.Attributes)
{
    var message = "Name:" + attr.Name + ", Value:" + attr.Value;
    project.SendToLog(message, ZennoLab.InterfacesLibrary.Enums.Log.LogType.Info);
}
No idea how this works, but it definitely does not return current page Elements:
91340
 

VladZen

Administrator
Команда форума
Регистрация
05.11.2014
Сообщения
22 480
Благодарностей
5 917
Баллы
113

Вложения

  • Спасибо
Реакции: lokiys

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