-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
SAFARI: NoSuchWindowError: A request to use a window could not be satisfied because the window could not be found. #3796
Comments
i have same issue. |
The below code works fine for me, describe('Google Search', function() {
let driver;
beforeEach(async function() {
driver = await new Builder().forBrowser('safari').build();
});
afterEach(async function() {
await driver.quit();
});
it('example', async function() {
await driver.get('http://google.com/ncr');
await driver.manage().window().setSize(1024,500);
await driver.findElement(By.name('q')).sendKeys('webdriver');
await driver.findElement(By.name('btnG')).click();
await driver.wait(until.titleIs('webdriver - Google Search'), 1000);
});
}); |
it does not work |
@manoj9788 :Can i ask your safari version? |
@mike123vn 10.0.2 |
So it seems to be that this bug appears in version >=10.1 |
@manoj9788 's solution does not work for me, and my safari version is 10.1, too. |
I am not sure as such where could be the problem. As we don't support Safari actively now, pls raise an issue with Apple's Radar. |
We fixed a window resizing issue in Safari Technology Preview 28: https://webkit.org/blog/7516/release-notes-for-safari-technology-preview-28/ Can you please verify on that version, or later? |
Verified using Safari Technology Preview Release 29. Window came up and responded to some basic actions such as page loading, element localisation and highlighting. Result: ✅ Test successful. |
How do start safari technology Preview in the capabilities of your conf.ts ? |
I'm going to close this as being fixed in recent SafariDriver. |
@MentalDisruptor Hi, I have installed safari preview in my mac book, It doesn't work, it shows exception- Build info: version: '3.4.0', revision: 'unknown', time: 'unknown' System info: host: 'mkusers-iMac.local', ip: '10.18.15.42', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.12.4', java.version: '1.8.0_131' Driver info: driver.version: unknown" am i missing any capabilities here?? Thanks! |
@Elangopalakrishnan Hi there. I tried in Java, not C#. I can't tell you how to do that in C#. But I guess that you also need to set the correct SafariOptions and DesiredCapabilities in your C# code accordingly. What I've done in Java:
Hope that helps. :) |
@MentalDisruptor Need to add any extension in safari technology preview browser like we added web driver 2.48 in safari browser ? Need to specify any path in capabilities ?? RemoteWebDriver rwd = new RemoteWebDriver(new Uri("http://10.18.15.52:5555/wd/hub"), capabilities, TimeSpan.FromSeconds(180)); |
@p0deje are you sure this issue has been fixed in recent safaridriver ? |
I haven't checked, but people above tells it's fixed. |
@p0deje not fixed in Safari Version 10.1.1 (12603.2.4). I haven't tried STP though. |
Yeah, the comments above say that it's fixed in TP. |
I am still getting this issue. |
Selenium Webdriver Version: 3.4.0 Running on Browserstack. and getting the following error:
|
@arjunjh10 Please read the entire thread. This is not fixed in 10.1 or 10.1.1, but it might be fixed in the latest Safari Technology Preview (37). Can you try using Safari Technology Preview? |
@burg Thanks for the reply. Yes I do realise i didnt read it thoroughly. I'd try out Tech preview for my case. Thanks again |
I'm using os.arch: 'x86_64', os.version: '10.12.6', java.version: '1.8.0_144', selenium: 3.4.0, safari: 10.1.2 and with Safari Technology Preview (Release 38, August 2017) works fine. This is my Java code:
And after that, the driver.manage().window().maximize() instruction, started working. |
Mac OS - OS X EI Captain My configurations are - capabilities: { |
Hi! But I use NodeJS So in selenium-webdriver 4.0.0-alpha.1 for setting window size use My solution is calling setRect with all argumet: For example: if U set x = 0 or 1 OR y = 0 or 1, it has error:
OR
That's why I set "x" = 2 and "y" = 2 :) |
This is a safaridriver bug that has been fixed already in Safari Technology Preview. It's coming eventually to a Safari update.
… On Feb 1, 2019, at 3:08 AM, RAdevelop ***@***.***> wrote:
Hi!
I have same problem with: driver.manage().window().setSize(1024,768)
But I use NodeJS
macOS Sierra 10.12.6
"selenium-webdriver": "^4.0.0-alpha.1"
node -v v11.2.0
So in selenium-webdriver 4.0.0-alpha.1 for setting window size use driver.manage().window().setRect()
My solution is calling setRect with all argumet:
For example:
driver.manage().window().setRect({"width": width, "height": height, "x": 2, "y": 2});
if U set x = 0 or 1 OR y = 0 or 1, it has error:
InvalidArgumentError: Parameter 'y' has a boolean value, which is not allowed.
OR
InvalidArgumentError: Parameter 'x' has a boolean value, which is not allowed.
That's why I set "x" = 2 and "y" = 2
:)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <#3796 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAEUGGLakmb8vnDNf1S0QSy8ompfaqAJks5vJCBAgaJpZM4M3RB1>.
|
Meta -
OS: OSX 10.11.6
Selenium Version: 3.3.0, VSCode, npm/javascript
Browser: Safari
Browser Version: 10.1 (11603.1.30.0.34)
Expected Behavior -
Should be able to manipulate the window via
driver.manage().window().setSize(1024,768)
Actual Behavior -
NoSuchWindowError: A request to use a window could not be satisfied because the window could not be found.
Steps to reproduce -
$ mocha --require bootstrap
bootstrap.js:
test.js:
I am using babel & es7, and this works just fine for chromedriver, so if you think I am missing something regarding that configuration, it's probably just been omitted for brevity in my example
The text was updated successfully, but these errors were encountered: