collective / robotframework-selenium2screenshots

Robot Framework keyword library for capturing annotated screenshots with Selenium2Library
28 stars 12 forks source link

Impossible to crop if the selector ending by the letter 'u' #10

Closed flohcim closed 6 years ago

flohcim commented 6 years ago

When you use the keyword Capture and crop page screenshot and you use a selector ending by the letter 'u', the selector 'ul.dropdown-menu' is transform in 'ul.dropdown-men' who throw a fail.

The following file can reproduce the problem:

*** Settings ***
Documentation     A test suite to reproduce Selenium2Screenshots problem.
Library           Selenium2Screenshots
Library           Selenium2Library

*** Variables ***
${BROWSER}        Firefox

*** Test Cases ***
Reproduce Problem
    Open Browser  https://plone.org  ${BROWSER}
    Capture and crop page screenshot  capture1.png
    ...    css=#navbar
    Capture and crop page screenshot  capture2.png
    ...    css=div.about
    Click Element  css=#navbar li.dropdown
    Sleep  1
    Capture and crop page screenshot  capture3.png
    ...    css=ul.dropdown-menu
    [Teardown]    Close Browser

The fail:

pybot plop.robot 
==============================================================================
Plop :: A test suite to reproduce Selenium2Screenshots problem.               
==============================================================================
Reproduce Problem                                                     | FAIL |
ul.dropdown-men was not found and no image was cropped: 'ul.dropdown-men' does not match '^[\d\.]+$'
------------------------------------------------------------------------------
Plop :: A test suite to reproduce Selenium2Screenshots problem.       | FAIL |
1 critical test, 0 passed, 1 failed
1 test total, 0 passed, 1 failed
==============================================================================
datakurre commented 6 years ago

Fixed in 0.8.0 release.

@flohcim Thanks for reminding about the release :)