'Value cannot be null error casting Generic list to F# List / Array

My Code is ( using Microsoft playwright to scrape a web page )

let bpl = page.Locator("//tr[@title]")
let! links = 
    bpl.EvaluateAllAsync("(tr) => tr.map(element => element.getAttribute(\"title\"))") 
    |> Async.AwaitTask
let aa = links |> Seq.toArray

If I just run the first 2 lines - it will return what looks like a System.Collections.Generic.List of type string - this is exactly what I need.

enter image description here

Now I want to cast to an F# list or array - but as soon as I add the 3rd line I get an error ( Value cannot be null ) . Only the error happens before it even reaches the 3rd line.

what am I missing?

Full stack trace:

enter image description here

f#


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source