!*< def
!define target {<head><title>To Here</title></head>othering
<a href='javascript:window.close()'>closing</a>
}
!define html [{{{<head><title>From</title></head>
<div id='popup' onclick="javascript:window.open('other.html', 'my own name', 'width=400,height=200,scrollbars=yes')">Option</input>">Linkk</div>
homing}}}]
*!

|''keywords''|chrome,htmlunit, firefox|

!include -c <FitLibraryWeb.SpiderFixture.SpecifySpiderFixture.SpecSetUp

|''make file''|other.html|''from''|${target}|

|''with html''|${html}|

|''page source''|'''contains'''|homing|

|show|windows|

|''click''|popup|

|show|windows|

|''text of''|//title|'''is'''|From|

|''select window with''|//title|''as''|To Here|

|show|windows|

|''page source''|'''contains'''|othering|

|''text of''|//title|'''is'''|To Here|

Switch back:

|''select window with''|//title|''as''|From|

|''page source''|'''does not contain'''|othering|

Can also select window with an xpath containing text by using 'contains' instead of 'as':

|''select window with''|//title|''contains''|To Here|

|''page source''|''contains''|othering|

|''text of''|//title|''is''|To Here|

