- Регистрация
- 02.11.2011
- Сообщения
- 97
- Реакции
- 6
- Баллы
- 8
Находит супер, еще вопрос что тут не так:
var tab = instance.ActiveTab;
int foundM = tab.FindElementsByXPath("//a[@class='C8nzq BmP5tf']").Count;
int foundD = tab.FindElementsByXPath("//a/h3").Count;
if (foundD > foundM)
{
var ret=foundD;
}
else
{
var ret=foundM;
}
return ret;
проблема в return ... , но что не так
var ret = 0;
if (foundD > foundM)
{
ret=foundD;
}
else
{
ret=foundM;
}
return ret;
Привязываться к динамическим атрибутам ошибочный путь.@class='C8nzq BmP5tf']"
Подскажите по похожей задаче
int numeric = Convert.ToInt32(project.Variables["CurrentNumber"].Value);
HtmlElementCollection heCol = instance.ActiveTab.FindElementsByXPath("//div[numeric]/p");
int count = heCol.Count;
return count;
Как правильно передать переменную сюда?
string numeric = project.Variables["CurrentNumber"].Value;
HtmlElementCollection heCol = instance.ActiveTab.FindElementsByXPath("//div["+ numeric +"]/p");
int count = heCol.Count;
return count;
HtmlElementCollection heCol = instance.ActiveTab.FindElementsByXPath("//div["+ project.Variables["CurrentNumber"].Value +"]/p");
int count = heCol.Count;
return count;


