Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //switches to object
- //this method can be overridden
- protected synchronized void switchToMe()
- {
- //firstly we should switch parent browser window on
- if (parent!=null)
- {
- parent.switchToMe();
- }
- else
- {
- nativeWindow.switchToMe();
- }
- //if this object is placed on some frame
- if (frameToSwitchOnInt!=null)
- {
- frameSupport.switchTo(frameToSwitchOnInt);
- return;
- }
- if (frameToSwitchOnStr!=null)
- {
- frameSupport.switchTo(frameToSwitchOnStr);
- return;
- }
- if (frameToSwitchOnElem!=null)
- {
- frameSupport.switchTo((WebElement) frameToSwitchOnElem);
- return;
- }
- return;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement