Subject: | Method select_frame is missing |
Hi,
I'm start to test my frame based webapplication with Selenium. After some
hassle I looks fine now. My starting point was a Perl testscript
generated with Selenium IDE. Looks good.
One thing I had to add in WWW::Selenium was the command 'selectFrame'.
A patch is attached.
Subject: | select_frame.patch |
diff -u -r Test-WWW-Selenium-1.04/lib/WWW/Selenium.pm Test-WWW-Selenium-1.05_devel/lib/WWW/Selenium.pm
--- Test-WWW-Selenium-1.04/lib/WWW/Selenium.pm 2006-10-06 07:47:21.000000000 +0200
+++ Test-WWW-Selenium-1.05_devel/lib/WWW/Selenium.pm 2006-11-14 10:01:07.000000000 +0100
@@ -813,6 +813,26 @@
}
+=item * $sel-E<gt>select_frame($locator)
+
+Selects a frame within the current window. (You may invoke this command
+multiple times to select nested frames.) To select the parent frame,
+use "relative=parent" as a locator;
+to select the top frame, use "relative=top".
+
+You may also use a DOM expression to identify the frame you want directly,
+like this: dom=frames["main"].frames["subframe"]
+
+$locator is an element locator identifying a frame or iframe.
+
+=cut
+
+sub select_frame {
+ my $self = shift;
+ $self->do_command('selectFrame', @_);
+}
+
+
=item * $sel-E<gt>wait_for_pop_up($window_i_d, $timeout)
Waits for a popup window to appear and load up.