How does puppeter sharp get the value of an attribute?It seems that getting properties and controls is not as convenient as Windows Forms WebBrowser。 In the following code, I can't get the value of type
var node=await page.QuerySelectorAsync("#uid" );
var vv=await node.GetPropertyAsync("type");
html
<input name="uid" type="text" style="height:50px;font-size:20px;" onkeypress="txtEnter(this,event)" class="form-control" id="uid">
I think EvaluateFunctionAsync
is the most straight forward way to do this:
var type = await node.EvaluateFunctionAsync<string>("node => node.type");