Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to specify new window type #833

Merged
merged 2 commits into from Nov 28, 2020

Conversation

OndraM
Copy link
Collaborator

@OndraM OndraM commented Nov 20, 2020

This extends creating new window added in #799, so that you can specify intended window type (tab or window), as defined in W3C WebDriver spec.
It seems more reasonable to have it as part of RemoteTargetLocator (not directly in RemoteWebDriver), similarly as Java bindings does. So lets move the method there and mark the previous one deprecated.

Example:

// before
$driver->newWindow();

// after:
$driver->switchTo()->newWindow();
// with window type specified:
$driver->switchTo()->newWindow(WebDriverTargetLocator::WINDOW_TYPE_WINDOW); // try to open new window
// or 
$driver->switchTo()->newWindow(WebDriverTargetLocator::WINDOW_TYPE_TAB); // try to open new tab

After merge:

@OndraM OndraM changed the title Add option to specify window type Add option to specify new window type Nov 20, 2020
@OndraM OndraM merged commit cab6d4a into php-webdriver:main Nov 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants