Accessing elements from within a iFrame -fails in watir-webdriver 0.6.6 - works fine in 0.6.4

后端 未结 2 1962
轻奢々
轻奢々 2021-01-16 13:35

I am trying to select a value in a dropdown which is inside a iFrame. The frame is nested within a table. HTML:

 


        
相关标签:
2条回答
  • 2021-01-16 14:22

    Watir-webdriver 0.6.5 has changed the way locating frames works.

    • Before (ie pre-0.6.5), browser.frame located frame and iframe elements.
    • Now, browser.frame locates frame elements and browser.iframe locates iframe elements.

    You will need to change your frame accessor to match the new rules (when you migrated to 0.6.5 or later). The second parameter needs to change from :frame to :iframe:

    element(:select_frame, :iframe, :src => /MyApplicantPortal\/Applicant\/\d+\/SelectOrderTemplate\?t=1/)
    
    0 讨论(0)
  • 2021-01-16 14:30

    I am in the process of releasing a new version of the page-object gem that addresses this issue. Should be out in a day or two.

    0 讨论(0)
提交回复
热议问题