Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
23 lines (18 sloc) 616 Bytes
package agouti
import (
// SwitchToFrame focuses on the frame specified by the selection. All new and
// existing selections will refer to the new frame. All further Page methods
// will apply to this frame as well.
func (s *Selection) SwitchToFrame() error {
selectedElement, err := s.elements.GetExactlyOne()
if err != nil {
return fmt.Errorf("failed to select element from %s: %s", s, err)
if err := s.session.Frame(selectedElement.(*api.Element)); err != nil {
return fmt.Errorf("failed to switch to frame referred to by %s: %s", s, err)
return nil
You can’t perform that action at this time.