tag:blogger.com,1999:blog-4065813838796681997.post6810762520327569317..comments2023-03-28T12:31:44.912-04:00Comments on QA & Testing: Frames and WebDriverDarrellhttp://www.blogger.com/profile/18232752184374702137noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-4065813838796681997.post-31237839934105099202014-01-03T22:41:52.143-05:002014-01-03T22:41:52.143-05:00Hamid,
If the thank you page is on the default if...Hamid,<br /><br />If the thank you page is on the default iframe then you need to switch back to the default page using driver.switchTo().defaultContent().<br /><br />If the thank you page is a different window then you will need to use http://darrellgrainger.blogspot.ca/2012/04/how-to-find-popup-window-if-it-does-not.html to open the pop up window.<br /><br />If it is a different iframe then you will need to switch to the new iframe before dealing with the tahnka you page.<br />Darrellhttps://www.blogger.com/profile/18232752184374702137noreply@blogger.comtag:blogger.com,1999:blog-4065813838796681997.post-76119643596370746242014-01-03T17:44:10.771-05:002014-01-03T17:44:10.771-05:00This is a great stuff, well written and clear. Whe...This is a great stuff, well written and clear. When I switch to the frame listed below, I am asked to enter name, card# and zip code then press OK.<br /> iframe src="https://www.somesite.com/framesite.aspx id="id1" name="name1" width="350" height="110" frameborder="0" scrolling="no"<br />/iframe> <br />If name, card# and zipcode are correct, it displays a thank you page.<br />How do you switch to the thank you page to verify that your test passed or failed?<br /><br />Thanks,<br />Hamid AssousAnonymoushttps://www.blogger.com/profile/00851979678160144870noreply@blogger.comtag:blogger.com,1999:blog-4065813838796681997.post-60832939050286975672013-11-18T05:48:52.391-05:002013-11-18T05:48:52.391-05:00Wow!!! This is what I was looking for...thanks for...Wow!!! This is what I was looking for...thanks for a great post!!!Continue the good work!!!Dipti Joshihttps://www.blogger.com/profile/00678401200349681451noreply@blogger.comtag:blogger.com,1999:blog-4065813838796681997.post-14780932083154779272013-03-23T14:34:25.131-04:002013-03-23T14:34:25.131-04:00Lotem hiki, the frame() method takes a frameName, ...Lotem hiki, the frame() method takes a frameName, an index or 'child'. The dot separator the Selenium documentation refers to is not the input to frame() but chaining multiple calls, i.e.<br /><br />driver.switchTo().frame("frameName").switchTo().frame(0).switchTo("child");<br /><br />This is really just short hand for:<br /><br />driver = driver.switchTo().frame("frameName");<br />driver = driver.switchTo().frame(0);<br />driver = driver.switchTo().frame("child");<br />Darrellhttps://www.blogger.com/profile/18232752184374702137noreply@blogger.comtag:blogger.com,1999:blog-4065813838796681997.post-20727132083895611742013-03-04T09:23:19.514-05:002013-03-04T09:23:19.514-05:00I was trying to switch to an inner iframe in one s...I was trying to switch to an inner iframe in one step - like in the selenium documentation:<br /><br />{ It’s possible to access subframes by separating the path with a dot, and you can specify the frame by its index too. That is:<br /><br />driver.switchTo().frame("frameName.0.child");<br /><br />}<br /><br />but it doesn't work. <br />any idea why?Anonymoushttps://www.blogger.com/profile/15347090474378438978noreply@blogger.comtag:blogger.com,1999:blog-4065813838796681997.post-38524587318184770382013-01-25T07:27:29.821-05:002013-01-25T07:27:29.821-05:00Anonymous, in manual testing I wait for an element...Anonymous, in manual testing I wait for an element to be able to click. Rather than wait for a page to load I wait until the element I want to click on is available.<br /><br />With a frame it would be more loop until the frame is available to switch to then loop until the element within the frame is available to click.<br /><br />If you want more details please ask at the WebDriver Google Group. It is a better place to have an interactive conversation. I check that group daily.<br />Darrellhttps://www.blogger.com/profile/18232752184374702137noreply@blogger.comtag:blogger.com,1999:blog-4065813838796681997.post-88994946458327817212013-01-24T23:17:30.826-05:002013-01-24T23:17:30.826-05:00Very Informative,
How do you replace selenium api...Very Informative,<br /><br />How do you replace selenium api's WaitForFrameToLoad, since I still haven't found a effective way to replace it, since some times you click something on the right frame and the left frame loads but when u switch to it it fails. Any feedback on this is much appreciated.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-4065813838796681997.post-79886733085060651652012-08-02T18:44:22.351-04:002012-08-02T18:44:22.351-04:00Good article. Thanks for the insight. Found this o...Good article. Thanks for the insight. Found this out the hard way myself while porting RC test to WebDriver.<br /><br />Want to point out one thing though, you may encounter this issue while porting RC tests since Selenium RC abstracted away the frame & iframe DOM navigation concept of WebDriver automatically taking care of it behind the scenes for you.<br /><br />For those who automated tests where Selenium RC took care of the iframes for you and you didn't have to explicit know/find the iframe, this will come as a surprise when you find element with Firebug related tools and (don't spend too much time looking around contextually whether it's nested inside some iframe) as WebDriver will then fail to find element that you assumed in RC was on the main page.man9ar00https://www.blogger.com/profile/12846267464022901501noreply@blogger.comtag:blogger.com,1999:blog-4065813838796681997.post-41965996376313441052012-04-19T07:33:53.687-04:002012-04-19T07:33:53.687-04:00This comment has been removed by a blog administrator.Anonymoushttps://www.blogger.com/profile/02562845187431149977noreply@blogger.com