Git Product home page Git Product logo

Comments (6)

fhoeben avatar fhoeben commented on May 28, 2024

I haven't looked at angular-ui/ui-select before. From the name it seems using 'select' would be the most logical verb to use in the wiki. Is there a public site where I can see this in action so I could see if I could troubleshoot myself?

In interactive usage can you select a value from the list by typing the option after clicking the element (or going to it via 'tab')? That is what enterAs will do.
The exception you get originates from the fact that with enterAs I try to clear before entering text. That is not allowed for a div. You could try to create your own subclass of NgBrowserTest and add a method to enter without clearing first (an override of enterFor present in BrowserTest).
And see what result you get with that.

I'm thinking of

    @Override
    public boolean enterFor(String value, String place) {
        boolean result;
        WebElement angularModelInput = getAngularElementToEnterIn(place);
        if (angularModelInput == null) {
            result = super.enterFor(value, place);
        } else {
            sendValue(angularModelInput, value);
            result = true;
        }
        return result;
    }

P.S. Why do you need the 3 second wait after starting the selenium driver?

from hsac-fitnesse-fixtures.

fhoeben avatar fhoeben commented on May 28, 2024

I did a small proof of concept myself and did find some issues. I have pushed a first attempt to get something to work. With the latest code I can do (HsacExamples.SlimTests.BrowserTests.AngularUiSelectTest):

|storyboard|ng browser test                         |
|open      |http://run.plnkr.co/plunks/jBJkDb/      |
|click     |Select or search a person in the list...|
|press     |Adam                                    |
|press enter                                        |

Not yet great, but work in progress...

from hsac-fitnesse-fixtures.

fhoeben avatar fhoeben commented on May 28, 2024

I tried my idea of overriding enterFor, but that did not work for http://run.plnkr.co/plunks/jBJkDb/. Selenium does not do sendKeys() to a div, just like it will not clear() it

from hsac-fitnesse-fixtures.

fhoeben avatar fhoeben commented on May 28, 2024

I see that a similar approach to my quick fix for working with ui-select was suggested in a ui-select issue (angular-ui/ui-select#270). So maybe my quick fix is just the way to go...

from hsac-fitnesse-fixtures.

andrealbinop avatar andrealbinop commented on May 28, 2024

@fhoeben,
Your approach worked like a charm. Still couldn't make it work with ng-model selector though, but I guess your suggestion will do for now! Closing the issue!

from hsac-fitnesse-fixtures.

andrealbinop avatar andrealbinop commented on May 28, 2024

About the 3 seconds wait after starting the selenium driver is just a leftover from a previous test sorry.

from hsac-fitnesse-fixtures.

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.