RepoItemInfo cache of AbsolutePath
Posted: Tue Dec 14, 2010 4:01 pm
Hi there
I made a little method to detect a window of my application with windowtitle. (SelfInfo is of type RepoItemInfo)
First time I invoke this method it works as expected.
After that the AbsolutePath in SelfInfo is set to "/form[@automationid='MainView']" and when I invoke the method the second time, the absolute path is set to "/form[@automationid='MainView']/form[@automationid='MainView' and @windowtext~'^somepath']" and that's why the window could not be located.
What can I do? Disable the cache on this.MyForm.UseCache doesn't work...
And this.MyForm.SelfInfo.AbsolutePath is readonly and I cannot reset this
Thanks in advance
Martin
I made a little method to detect a window of my application with windowtitle. (SelfInfo is of type RepoItemInfo)
First time I invoke this method it works as expected.
After that the AbsolutePath in SelfInfo is set to "/form[@automationid='MainView']" and when I invoke the method the second time, the absolute path is set to "/form[@automationid='MainView']/form[@automationid='MainView' and @windowtext~'^somepath']" and that's why the window could not be located.
What can I do? Disable the cache on this.MyForm.UseCache doesn't work...
And this.MyForm.SelfInfo.AbsolutePath is readonly and I cannot reset this
Thanks in advance
Martin
public void SelectSolutionManagerWindowByFileName(string openedFileName) { this.MyForm.SelfInfo.Path = string.Format( "/form[@automationid='MainView' and @windowtext~'^{0}']", openedFileName); }