Whenever you see a frame with access denied, you'll have to 'goto' the frame's url and then go from there.

This will give you extra IE windows.

This isn't pretty, but it should 'work'.

Bret

At 04:51 PM 7/26/2005, Tuyet Cong-Ton-Nu wrote:

This command does take me to the login page:

1) irb(main):005:0> ie.goto("https://qa-common-b1.barra.com/araneae/login";)

ð      0.188

ð

2) Then I do this:

irb(main):007:0> ie.form(:name, "loginForm").submit

=> 0

Which launches another IE instance to display the Analysis page (the page after login).

But the original IE where the Login page is displayed is also opened.

So I have 2 instances of IE at this point. This doesn t seem right. Why doesn t the first IE close?



3) then I attach to the second IE which is successful



irb(main):009:0> ie = Watir::IE.attach(:url, "https://qa-common-b1.barra.com/ara

neae/app")



4) now I get the html of the Analysis page:

irb(main):010:0> ie.html

=> "<FRAMESET border=0 frameSpacing=0 rows=0,* frameBorder=0><FRAME border=0 nam

e=relay marginWidth=0 marginHeight=0 src=\"/include/blank.html\" frameBorder=\"\

" noResize scrolling=no><FRAME border=0 name=main marginWidth=0 marginHeight=0 s

rc=\"/araneae/Analysis/home?common.sessionId=99siQl7h0gSTwCwQCHDDKg99\" frameBor

der=0 scrolling=no></FRAMESET>"



Now that Iam here, the objects that I want to manipulate lives inside embedded frames.

This was the command that used to work:

ie.frame("main").frame("sidebar").frame("analysisSidebarTabContent").image(:src, /icon_report_positions.gif/).click



5) but now since the frames cannot be seen , how do I access click on the icon_report_positions.gift

irb(main):011:0> ie.show_frames

there are 2 frames

frame  index: 0 --Access Denied--

frame  index: 1 --Access Denied--

ð      0..1



What you suggest below will work if the object is at the main level as this example is, but won t work if the object is found within frames like the example above:





At 05:06 PM 7/25/2005, Tuyet Cong-Ton-Nu wrote:

>irb(main):005:0> ie.frame("main").text_field(:name,

>"UserId").fire_event("onFocus )



try ie.text_field(:name, 'UserId").fire_event('onFocus')



Watir won't work with frames served by different servers. I'm giving you a

way to keep that from happening.

_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

_____________________
 Bret Pettichord
 www.pettichord.com


_______________________________________________
Wtr-general mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/wtr-general

Reply via email to