0
votes

I am doing operation on 3 window.Using select window command in robot framework I will travels to 1st child window and in same way on 2nd child window.But after completion of task on 2nd window it will close automatically and then if I used select window for selecting again 1st window it will shows following error

Error:

"NoSuchWindowException: Message: no such window: target window already closed from unknown error: web view not found"

Code:

@{Window_list} =  Get Window Names
Select Window   @{Window_list}[1]
#Do some Operations On 1st window
#Launch Second window 

@{Window_list} =  Get Window Names
Select Window   @{Window_list}[2]
#Do some operations on 2nd window
#Save the changes on 2nd window it will close 2nd window automatically

Select Window   @{Window_list}[1]...........#fails at this keyword

If anyone has solution on this please mention.Thanks

1

1 Answers

2
votes

I do not know exactly the reason, but I've met this case and solved by using Run Keyword And Ignore Error.

In your case:

Run Keyword And Ignore Error    Select Window   @{Window_list}[1]