I was working on generating my own Element Repository and I wanted to be able to create a page and set a property (in this case a link name) and find a span tag with the TextContent of that property. Unfortunately whenever a variable is used it ignores the TextContent expression and just finds the first span and returns that.
and
I have tried various combinations of hard coded strings and variables and it appears only hard coded Strings work in these functions. I don't know if it is an issue with the framework or a hole in my knowledge of c#. Attaching the complete Pages class.
public
HtmlSpan Link
{
get
{
return
Get<HtmlSpan>(
"TextContent="
+ _link,
"tagname=span"
);
}
}
and
public
class
ExpressionDefinitions
{
private
HtmlFindExpression _link;
public
ExpressionDefinitions(
string
link)
{
string
textcontent =
"TextContent="
+ link;
_link =
new
HtmlFindExpression(textcontent,
"tagname=span"
);
}
public
HtmlFindExpression Link {
get
{
return
_link; } }
public
HtmlFindExpression LogOff =
new
HtmlFindExpression(
"tagname=button"
,
"TextContent=Log Off"
);
}
I have tried various combinations of hard coded strings and variables and it appears only hard coded Strings work in these functions. I don't know if it is an issue with the framework or a hole in my knowledge of c#. Attaching the complete Pages class.