>The app that I am working with has a lot of popups with important functionality on them. I have been unsuccessful in getting Watir to see these new windows, and I cant figure out why. The window Im looking at now appears after a button click: >ie.button(:name, "addItem").click >and Ive tried all these variations to get it to work: >ie2 = Watir::IE.attach(:title, "Project - Administration -- Web Page Dialog") >ie2 = Watir::IE.attach(:title, "Project - Administration") >ie2 = Watir::IE.attach(:title, /Project/) >ie2 = Watir::IE.attach(:title, /project/) >ie2 = Watir::IE.attach(:url, "website list at the bottom of the new window") >ie2 = Watir::IE.attach(:url, "website found in the properties of the button") >ie2 = Watir::IE.attach(:url, /Project/) >ie2 = Watir::IE.attach(:url, /project/) >plus a few others, followed by >ie2.button(:value, "Cancel").click >to see if it worked. >It either gives me 'Unable to locate a window with X' (#'s 5 & 6) or it does nothing (most of the rest of them). When it gets to the window, it just sits and waits, and when I click Cancel it stops the run, and exits with no errors. So its not finding the window, but not giving me any errors.
None of your :urls look very much like URLS to me, and if the titles in your second window are also titles of your first window, you're not likely to have success. Try working with IRB, the interactive Ruby interpreter. After your first click, try attaching using various options (maybe try matching any pattern that isn't in your first IE object, using negation?) and then type ie2.html and see what you get. ---Michael B. _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
