Skip to content

Fixed build, added support for negative indexes in Robot keywords - #317

Merged
emanlove merged 6 commits into
robotframework:masterfrom
eweitz:fixed-se2lib-build
Aug 27, 2014
Merged

emanlove merged 6 commits into
robotframework:masterfrom
eweitz:fixed-se2lib-build

Conversation

@eweitz

@eweitz eweitz commented Aug 22, 2014

Copy link
Copy Markdown
Contributor

This pull request fixes the rtomac:master build and adds support for negative indexes in Robot keywords.

Fixed Se2Lib build

@emanlove, this fixes the build failure currently noted at https://github.com/rtomac/robotframework-selenium2library.

Passing Travis CI build:

The 14 critical test failures reported in the current rtomac:master build (https://travis-ci.org/rtomac/robotframework-selenium2library/jobs/23423255) are caused by unexpected content in test/results/output.xml. An extra line was added in the log output of a frequently-used command -- likely due to an update in the upstream Selenium 2 package.

The failing Se2Lib tests simply needed to account for the fact that the expected log file content is now a few lines ahead of where it was previously.

I also applied a fix for the 'Choose File' bug by @HelioGuilherme66 (from 532295c).

Support for negative indexes in Robot keywords

Robot keywords like Table Row Should Contain support looking up elements with a positional, 1-based index, e.g.

Table Row Should Contain   ${table_locator}    1    ${expected_first_row}

verifies that the first row (row 1) in the table with the ID defined in 'table_locator' has the expected content defined in 'expected_first_row'.

Unfortunately, Table Row Should Contain does not currently support easily looking up content from the end of a table. For example, it would be very helpful to be able to write something like

Table Row Should Contain   ${table_locator}    -1    ${expected_last_row}

to verify the content of the last row (row -1) in a table. Row -2 would be the second-to-last row, and so on -- just like negative indexes in Python lists.

This pull request adds support for negative indexes to the following Robot keywords:

  • Table Row Should Contain
  • Table Column Should Contain
  • Table Cell Should Contain

eweitz referenced this pull request in HelioGuilherme66/robotframework-seleniumlibrary Aug 22, 2014
Set tag Regression to non-critical in travis.yml.
Utility shell script to rename *.txt to *.robot.
@eweitz eweitz changed the title Fixed Se2Lib build Fixed Se2Lib build, added support for negative indexes in Robot keywords Aug 22, 2014
@eweitz eweitz changed the title Fixed Se2Lib build, added support for negative indexes in Robot keywords Fixed build, added support for negative indexes in Robot keywords Aug 22, 2014
@ombre42

ombre42 commented Aug 26, 2014

Copy link
Copy Markdown
Contributor

Thenk you so much Eric.
Green?

@eweitz

eweitz commented Aug 26, 2014

Copy link
Copy Markdown
Contributor Author

@ombre42, glad to help. Is there anything preventing this from being merged into rtomac:master?

emanlove added a commit that referenced this pull request Aug 27, 2014
Fixed build, applied fix for 'Choose File' bug, from Hélio Guilherme, and added support for negative indexes in Robot keywords
@emanlove
emanlove merged commit 14154e6 into robotframework:master Aug 27, 2014
@ombre42 ombre42 added this to the 1.6 milestone Oct 2, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants