but I don't see that code is not closing my windows in project why?
' Time: 11:55 ' ' To change this template use Tools | Options | Coding | Edit Standard Headers. ' Imports System Imports System.Collections.Generic Imports System.Text Imports System.Text.RegularExpressions Imports System.Drawing Imports System.Threading Imports WinForms = System.Windows.Forms Imports Ranorex Imports Ranorex.Core Imports Ranorex.Core.Testing Namespace Easyadmin ''' <summary> ''' Description of UserCodeModule1. ''' </summary> <TestModule("705D7E00-647A-492F-A5E7-D62E35725C42", ModuleType.UserCode, 1)> _ Public Class UserCodeModule1 Implements ITestModule private repo As EasyadminRepository=EasyadminRepository.Instance ''' <summary> ''' Constructs a new instance. ''' </summary> Public Sub New() ' Do not delete - a parameterless constructor is required! End Sub ''' <summary> ''' Performs the playback of actions in this module. ''' </summary> ''' <remarks>You should not call this method directly, instead pass the module ''' instance to the <see cref="TestModuleRunner.Run(Of ITestModule)"/> method ''' that will in turn invoke this method.</remarks> Private Sub Run() Implements ITestModule.Run Mouse.DefaultMoveTime = 300 Keyboard.DefaultKeyPressTime = 100 Delay.SpeedFactor = 1.0 ' dom[@domain='localhost:7019']//div[@Id~'^*-window'] ' Dim webDocument As WebDocument ="/dom[@domain='localhost:7019']" '' Dim Div As DivTag = webDocument.FindSingle(".//div[@Id~'^*-window']") ' Dim div1 As ATag=webDocument.FindSingle(".//div[#'gridview-[0-9][0-9][0-9][0-9]']/table/tbody/tr[2]/td/div/table/tbody/tr[1]/td[6]/div/a[@innertext='23']") ' div1.Click() ' Dim repo As GlobalRepository = GlobalRepository.Instance ' Create PopupWatcher Dim myPopupWatcher As New PopupWatcher() ' Add a Watch using a RanoreXPath and triggering the Method CloseUpdateCheckDialog myPopupWatcher.Watch("/form[@controlname='UpdateCheckForm']/button[@controlname='m_btnClose']", AddressOf CloseUpdateCheckDialog) ' Add a Watch using the info object of a button and triggering the Method CloseUpdateCheckDialog ' myPopupWatcher.Watch(repo.UpdateCheckDialog.btCloseInfo, CloseUpdateCheckDialog); ' Add a Watch using the info object of the dialog and the info object of the button to click ' myPopupWatcher.WatchAndClick(repo.UpdateCheckDialog.SelfInfo, repo.UpdateCheckDialog.btCloseInfo); ' Add a Watch using a repository folder object and the info object of the button to click ' myPopupWatcher.WatchAndClick(repo.UpdateCheckDialog, repo.UpdateCheckDialog.btCloseInfo); ' Start PopupWatcher myPopupWatcher.Start() End Sub Public Shared Sub CloseUpdateCheckDialog(myInfo As Ranorex.Core.Repository.RepoItemInfo, myElement As Ranorex.Core.Element) myElement.[As](Of Ranorex.Button)().Click() End Sub Public Shared Sub CloseUpdateCheckDialog(myPath As Ranorex.Core.RxPath, myElement As Ranorex.Core.Element) myElement.[As](Of Ranorex.Button)().Click() End Sub End Class End Namespace