Skip to content

Commit

Permalink
progress for puppeteer.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dummy committed Feb 5, 2019
1 parent 953496f commit 4c93f02
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,12 @@ public async Task SelectByIndicesAsync(IReadOnlyList<IDomElement> elements, int[
{
foreach (var element in elements)
{
var handle = await _page.QuerySelectorAsync(element.CssSelector);
await _page.SelectAsync(handle)
var selector = byIndices
.Select(x => $"{element.CssSelector} > option:nth-child({x+1})")
.Aggregate(string.Empty, (a, b) => $"{a}, {b}");
var handles = await _page.QuerySelectorAllAsync(selector);
//var values = handles.Select(x => x.)
//await _page.SelectAsync(handle)
}
}

Expand Down

0 comments on commit 4c93f02

Please sign in to comment.