Giter VIP home page Giter VIP logo

Comments (6)

yodurr avatar yodurr commented on May 9, 2024

I've got a repro, am looking into it

from winappdriver.

yodurr avatar yodurr commented on May 9, 2024

Hi, could you confirm that this sometimes succeeds? If so then I'm seeing the same thing you are.

Am running the following code and sometimes it does not succeed. Sometimes it does succeed and clicks the 5 button.

    DesiredCapabilities appCapabilities = new DesiredCapabilities();
    appCapabilities.setCapability("app", "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App");
    appCapabilities.setCapability("platform", "Windows");

    try {
        URL u = new URL("http://127.0.0.1:4723");
        RemoteWebDriver CalculatorSession = new RemoteWebDriver(u, appCapabilities);

        WebElement we = CalculatorSession.findElementByName("Five");
        if (we != null){
            we.click();
        }
    }
    catch (MalformedURLException mfe) {
    }

from winappdriver.

ignatenko-paul avatar ignatenko-paul commented on May 9, 2024

Unfortunately, I'm not succeed with your code. I've run it many times, but
the same error and exception happens.
(Moreover if I close calculator and run script again even session can't be
established)

ImmutableMap parameters = paramBuilder.build();
Response response = this.execute("newSession", parameters); <-- return
object which seen below
Map rawCapabilities = (Map)response.getValue();
DesiredCapabilities returnedCapabilities = new DesiredCapabilities();
Iterator platformString = rawCapabilities.entrySet().iterator(); <--
here NullPointerException occurs

java.lang.NullPointerException
at
org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:244)
at
org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:126)
at
org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:153)

[image: Встроенное изображение 1]

From the server console.

POST /session HTTP/1.1
Accept: application/json, image/png
Connection: Keep-Alive
Content-Length: 100
Content-Type: application/json; charset=utf-8
Host: 127.0.0.1:4723

{"desiredCapabilities":{"app":"Microsoft.WindowsCalculator_8wekyb3d8bbwe!App","platform":"Windows"}}
SessionManager - Creating session for
Microsoft.WindowsCalculator_8wekyb3d8bbwe!App
SessionManager - WinAppDriver succeeded loading MitaBroker
SessionManager - Application launched
SessionManager - Session successfully created:
1B9B6298-768D-4C33-8AC7-FA9ACCE268BE

HTTP/1.1 200 OK
Content-Length: 134
Content-Type: application/json

{"capabilities":{"app":"Microsoft.WindowsCalculator_8wekyb3d8bbwe!App"},"sessionId":"1B9B6298-768D-4C33-8AC7-FA9ACCE268BE","status":0}

2016-04-24 1:01 GMT+03:00 Yosef Durr [email protected]:

Hi, could you confirm that this sometimes succeeds? If so then I'm seeing
the same thing you are.

Am running the following code and sometimes it does not succeed. Sometimes
it does succeed and clicks the 5 button.

DesiredCapabilities appCapabilities = new DesiredCapabilities();
appCapabilities.setCapability("app", "Microsoft.WindowsCalculator_8wekyb3d8bbwe!App");
appCapabilities.setCapability("platform", "Windows");

try {
    URL u = new URL("http://127.0.0.1:4723");
    RemoteWebDriver CalculatorSession = new RemoteWebDriver(u, appCapabilities);

    WebElement we = CalculatorSession.findElementByName("Five");
    if (we != null){
        we.click();
    }
}
catch (MalformedURLException mfe) {
}


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#13 (comment)

from winappdriver.

yodurr avatar yodurr commented on May 9, 2024

server log looks correct.

Would it be possible for you to attach the test file so I can run the exact same thing? Also mention what version of Selenium. I'm using 2.53.0.

from winappdriver.

ignatenko-paul avatar ignatenko-paul commented on May 9, 2024

I had 2.41.0. After updating up to 2.53.0 it gets to work.
Thanks a lot and sorry for disturbing.

2016-04-25 0:07 GMT+03:00 Yosef Durr [email protected]:

server log looks correct.

Would it be possible for you to attach the test file so I can run the
exact same thing? Also mention what version of Selenium. I'm using 2.53.0.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#13 (comment)

from winappdriver.

yodurr avatar yodurr commented on May 9, 2024

Glad it's working!

from winappdriver.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.