Giter VIP home page Giter VIP logo

coyputables's Introduction

CoypuTables

For the most part, Coypu makes it nicer to automate testing of a webpage in .net (see http://gihub.com/coypu/coypu). But tables are not so nice. Coypu currently doesn't have an API to deal with tables, so this is a quick sketchpad project to trial how that could look.

It's a first cut, but it's working, and I've tried to keep it simple. It's based on the currently unreleased chain-scopes branch of Coypu, rather than master (it relies on chaining the scope of find operations).

You call it like this:

var table = session.FindId("table1").AsTable();

and table is a TableElementScope. You can now call all of the usual Find* methods that you can on normal elements, but you've also got Header, Footer and Body properties, which return back a TableRowGroupElementScope, from which you can get a header row and an enumerable of rows. From the TableRowElementScope, you can get at an enumerable of ElementScope for the cells.

The table-specfic element scope objects work in the same way as ElementScope - they don't search for the element until you try to access it (e.g. calling .Exists, or .HasCss, .FillIn, etc). The Rows and Cells properties also return an enumerable, which again, isn't evaluated until you start enumerating it. At which point, each child element is evaluated for existence, and an ElementScope (i.e. a deferred element) is returned for each existing row/cell.

It's worth noting that this constant evaluation is most likely a performance issue that will need to be addressed.

coyputables's People

Contributors

citizenmatt avatar kdevine avatar

Watchers

 avatar James Cloos avatar

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.