selenium-powershell
selenium-powershell copied to clipboard
Incredibly slow in powershell 7
Doing something as simple as this results in 4.3510603 seconds wait time:
Measure-Command {Write-Debug "Next"
$Element = Find-SeElement -Driver $Driver -XPath "/html/body/div/div/div/div/div/div/button"
Invoke-SeClick -Element $Element}
Whereas in PowerShell 5, it takes 0.3669819 seconds, so using powershell 7 is significantly impacting performance.
I will add, there is some mention to 7 being slower here, but it's surrounding web sessions using the invoke-restmethod command, and there's a fix for it: https://github.com/PowerShell/PowerShell/issues/12764
That's quite a long time.... hmm. Out of curiosity, can you double check the type of $Element
there when it comes back ($Element.GetType().FullName
)?