refactoror / SelBlocks

SelBlocks extension for Selenium IDE
10 stars 7 forks source link

"Not a Boolean Expression" error when using loadXmlVars - StoredVars are loaded, however Test Fails #27

Closed patrick-ryan1 closed 8 years ago

patrick-ryan1 commented 8 years ago

Hello,

Using latest versions of Firefox, Selenium IDE and SelBlock{}. When trying to loadXmlVars with only a file-path value, receiving “Not a Boolean Expression” error. There is no value in ?selector-expression listed in test case to resolve to Not a Boolean and the variables are loaded in Selenium IDE. The Test Fails however so further execution is not possible.

Selenium Test Case – loadXmlVars file://C:\ test.xml

<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

New Test
New Test
loadXmlVars file://C:\Users\usparya\Documents\GitHub\temp\vartest.xml

Test Data

Debug Log • [info] Executing: |loadXmlVars | file://C:\test.xml| | • [debug] Command found, going to execute loadXmlVars • [debug] [selblocks] FileReader() using URL to get file 'file://C:\test.xml' • [info] [selblocks] Reading from: file://C:\test.xml • [debug] [selblocks] 1) • [error] [selblocks] Error @1: [loadXmlVars|file://C:\test.xml], is not a boolean expression • [warn] [selblocks] Stack Trace • [error] Unexpected Exception: Error: @1: [loadXmlVars|file://C:\test.xml], is not a boolean expression. • [debug] testComplete: failed=false

Configuration

  1. Firefox 48 for Windows (7)
  2. Selenium IDE 2.9.1 loaded – restart Firefox
  3. SelBlock{} 2.1 Extensions Loaded
HSI-Ron commented 8 years ago

Hi, I'm having the same issue, how did you resolve it?

Thanks, Ron

refactoror commented 7 years ago

It is likely that the selector-expression, (the Target field), contained whitespace, or unprintable character(s). The non-empty, invalid expression is included in the error message immediately before 'is not'.

It should either be empty, or it should contain an expression that evaluates to a boolean as each entry is processed.

mirao commented 7 years ago

I have the same issue with this command (I didn't type any character into selector - value):

<tr>
    <td>loadXmlVars</td>
    <td>host.xml</td>
    <td></td>
</tr>

Log:

[error] @/home/mira/workspace/bela/trunk/selenium_ide/login/openLoginScreen.html: 2: [loadXmlVars|host.xml]: , is not a boolean expression

Workaround:

<tr>
    <td>loadXmlVars</td>
    <td>host.xml</td>
    <td>true</td>
</tr>

Used SW: