T
T
TechNOIR2017-10-31 09:51:19
PowerShell
TechNOIR, 2017-10-31 09:51:19

Powershell+Selenium. How to close a tab?

Good afternoon, fellow experts!
How to close last tab in Powershell+Selenium?
The site opens first, then another tab opens. It needs to be closed.
The list of tabs I receive $ie.WindowHandles
The last I receive through $ie.WindowHandles[-1]
.Remove () does not roll..
What options are there? Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
IvanSstarr, 2019-02-11
@IvanSstarr

$ie.SwitchTo().window($ieWindowHandles[-1]).Close()

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question