Skip to main content



      Home
Home » Archived » Jubula » Use of check text and not equal to operator(Rookie question on what I am doing wrong)
Use of check text and not equal to operator [message #1125568] Fri, 04 October 2013 12:56 Go to next message
Eclipse UserFriend
Thanks for some quick help. I am sure this is an easy question, but I am struggling to get this work. It might be that my regular expression was not correct.

I have a text field that I want to check. I want to test that the word "checked" is NOT in a string. I have tried various combinations of using the operator "not equals" with wild cards *checked*. I also tried using a matches with regular expressions.

So my example text that I am checking is something like.

file name, checked out (or checked out to)

Re: Use of check text and not equal to operator [message #1127960 is a reply to message #1125568] Mon, 07 October 2013 03:24 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

There are some examples of using regular expressions in the reference manual. I believe there's an example of how to check for non-existence there.

Hope that helps,
Alex
Re: Use of check text and not equal to operator [message #1128461 is a reply to message #1125568] Mon, 07 October 2013 14:19 Go to previous message
Eclipse UserFriend
Example of using regular expressions in the reference manual:
^.*[^(EXAMPLE)].*\$
It isn't working and it shouldn't work. Because it will always return true.
From wikipedia:

"[^ ] Matches a single character that is not contained within the brackets. For example, [^abc] matches any character other than "a", "b", or "c". [^a-z] matches any single character that is not a lowercase letter from "a" to "z". Likewise, literal characters and ranges can be mixed."

So in example it matches 'EXAMPLE STRINGEXAMPLE'. The only way to return false is to check the same string 'EXAMPLE'. You can test in any RegExp calc.

As i understood, the only way to "test that the word "checked" is NOT in a string" it's using '.*(?!EXAMPLE).*'

But we have another problem - still non-fixed issue:
http://www.eclipse.org/forums/index.php/t/332273/

Yes, in jubula 7.1 you sill cannot use question mark without single quotes. With single quotes it becomes just a text, not a regExp modificator.

PS offtopic: I used "another problem". Would "another issue" be more correctly in such phrase?..
Previous Topic:Using stored values as Test Data of other TCs
Next Topic:Jubula takes longer to save the changes
Goto Forum:
  


Current Time: Tue Jul 22 18:06:53 EDT 2025

Powered by FUDForum. Page generated in 0.03323 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top