Giter Site home page Giter Site logo

Comments (7)

EMCP avatar EMCP commented on May 5, 2024 3

I needed this but the url is 404 https://github.com/angular/protractor/blob/master/spec/basic/findelements_spec.js

from protractor.

phillycoder avatar phillycoder commented on May 5, 2024

Looking for an example/syntax to do find Elements from a parent fineElement. something like below.
Can you please give me an example how to do this?

ptor.findElements(protractor.By.tagName('tbody').protractor.By.tagName('tr'))

from protractor.

juliemr avatar juliemr commented on May 5, 2024

Check out the examples in findelements_spec here:

https://github.com/angular/protractor/blob/master/spec/basic/findelements_spec.js#L245

from protractor.

phillycoder avatar phillycoder commented on May 5, 2024

Awesome !!, following works.

        ptor.findElement(protractor.By.tagName('tbody')).findElements(protractor.By.tagName('tr')).then(function(rows){
            expect(rows.length).toBe(10);
        });

Thanks

from protractor.

tony-kerz avatar tony-kerz commented on May 5, 2024

can the '$' short-hand notation be used to find child elements of an element reference?

for example:

elt = $('.my-parent-class')
children = elt.$$('.my-child-class')

from protractor.

juliemr avatar juliemr commented on May 5, 2024

@tony-kerz $ works, but $$ cannot be chained. This inconsistency should probably be fixed.

from protractor.

dhanrajpru avatar dhanrajpru commented on May 5, 2024

how to locate both in protractor using java script?
@juliemr

from protractor.

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.