Skip to main content



      Home
Home » Archived » Jubula » Check that a specific string is not in a text
Check that a specific string is not in a text [message #1728205] Thu, 31 March 2016 18:10 Go to next message
Eclipse UserFriend
Hi,
i have a problem with text checking. I test functionality of checkbox. When the checkbox is checked - in the text box displays a text. When the checkbox is not checked - the text field does not display the text.
I test it ths way :
1. click on checkbox (after this it is not checked, so the text containing "something" should be not there...)
2. ub_ctx_checkText
TEXT ^.*[^(something)].*\$
OPERATOR matches

Where is the mistake? I did it according to the manual (http://help.eclipse.org/kepler/index.jsp?topic=%2Forg.eclipse.jubula.client.ua.help%2Fhtml%2Freference%2Fnode4.html&cp=26_2)
Re: Check that a specific string is not in a text [message #1728220 is a reply to message #1728205] Fri, 01 April 2016 02:59 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

Can you try using this?
^((?!something)[\s\S])*$

This is in the newer documentation here:
http://help.eclipse.org/mars/topic/org.eclipse.jubula.client.ua.help/content/html/userManual/tasks/useMatchingAndRegex/regex.html?cp=44_2_39_1

Best regards,
Alex
Re: Check that a specific string is not in a text [message #1728228 is a reply to message #1728220] Fri, 01 April 2016 04:44 Go to previous messageGo to next message
Eclipse UserFriend
Thank you for your advice.
I did it by you and new manul, but Jubula has some problem with syntax. (see attachment please)

  • Attachment: error.PNG
    (Size: 15.37KB, Downloaded 287 times)
Re: Check that a specific string is not in a text [message #1728254 is a reply to message #1728228] Fri, 01 April 2016 06:46 Go to previous messageGo to next message
Eclipse UserFriend
A couple ofthings to try:
- Put the question mark in single quotes
- Put the whole thing in single quotes
Re: Check that a specific string is not in a text [message #1728278 is a reply to message #1728254] Fri, 01 April 2016 10:58 Go to previous messageGo to next message
Eclipse UserFriend
Thanks. When I put whole thing in signle quotes the syntax error is away. But the test is not pass. I don't undestandt it. I attach sreen of application under test and screen of my test.
index.php/fa/25503/0/
index.php/fa/25504/0/
index.php/fa/25505/0/
  • Attachment: test.PNG
    (Size: 29.16KB, Downloaded 1198 times)
  • Attachment: app.PNG
    (Size: 52.00KB, Downloaded 1164 times)
  • Attachment: app2.PNG
    (Size: 37.29KB, Downloaded 1149 times)

[Updated on: Fri, 01 April 2016 11:05] by Moderator

Re: Check that a specific string is not in a text [message #1728394 is a reply to message #1728278] Mon, 04 April 2016 03:17 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

you're using Simple Match as an operator, which doesn't allow full regular expressions. Try using the "matches" operator.

Best regards,
Alex
Re: Check that a specific string is not in a text [message #1728449 is a reply to message #1728394] Mon, 04 April 2016 08:31 Go to previous messageGo to next message
Eclipse UserFriend
I did it with "matches" but still with error. When I check this text box first time - it's ok and I use regular expression with "simple match".
Re: Check that a specific string is not in a text [message #1728497 is a reply to message #1728449] Mon, 04 April 2016 21:52 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

what is the "text input component" you are clicking on before the second, failing check?
and can you add the screenshot of the properties view for the failing step (I want to see what error it is showing, and what text it says is actually in the component).

Thanks,
Alex
Re: Check that a specific string is not in a text [message #1728603 is a reply to message #1728497] Tue, 05 April 2016 14:52 Go to previous messageGo to next message
Eclipse UserFriend
Hi, "text input component" is the text box named Preview next the table. I click on it and next step is text checking.
index.php/fa/25545/0/
  • Attachment: err.PNG
    (Size: 57.31KB, Downloaded 922 times)

[Updated on: Tue, 05 April 2016 14:53] by Moderator

Re: Check that a specific string is not in a text [message #1728621 is a reply to message #1728603] Tue, 05 April 2016 21:23 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

From your screenshot I can see that you are using double quotes instead of single quotes. What happens if you use single quotes?

best regards,
Alex
Re: Check that a specific string is not in a text [message #1728638 is a reply to message #1728621] Wed, 06 April 2016 03:51 Go to previous messageGo to next message
Eclipse UserFriend
with single quotes
index.php/fa/25549/0/
  • Attachment: err.PNG
    (Size: 16.29KB, Downloaded 901 times)

[Updated on: Wed, 06 April 2016 07:29] by Moderator

Re: Check that a specific string is not in a text [message #1728672 is a reply to message #1728638] Wed, 06 April 2016 07:44 Go to previous messageGo to next message
Eclipse UserFriend
Did you make sure that the correct component is tested?
Regards
Oliver
Re: Check that a specific string is not in a text [message #1728676 is a reply to message #1728672] Wed, 06 April 2016 07:54 Go to previous messageGo to next message
Eclipse UserFriend
Yes, I'm sure. And value in tested component corresponds to the "Error details/Actual value = Disabled".
Re: Check that a specific string is not in a text [message #1728878 is a reply to message #1728676] Fri, 08 April 2016 04:34 Go to previous messageGo to next message
Eclipse UserFriend
Does it work when you check that e.g. "Disabled" is displayed?
Re: Check that a specific string is not in a text [message #1729014 is a reply to message #1728878] Sat, 09 April 2016 09:24 Go to previous messageGo to next message
Eclipse UserFriend
Yes, it works.
Re: Check that a specific string is not in a text [message #1729128 is a reply to message #1729014] Mon, 11 April 2016 07:33 Go to previous messageGo to next message
Eclipse UserFriend
Have you tried

^.*[^(Component)].*$

Regards
Oliver
Re: Check that a specific string is not in a text [message #1731723 is a reply to message #1729128] Mon, 09 May 2016 10:35 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

shouldn't be very hard to get for that check you want i tried it in a example on my machine. The Solution of Alex should work but you did /c/C instead of /s/S...

see here:

given is:
index.php/fa/25854/0/

my configuration for the testcase:
index.php/fa/25855/0/

to try the testcase i did a set that checks that the given text should not contain 1. Remmember
2. Remember

so the first should pass cause there is no "Remmember" with 2 m's in this label. the second should fail cuase there is a "Remember" in this label...

so lets see:
index.php/fa/25856/0/

tadaaa Smile

Best Regards
Dominik
Re: Check that a specific string is not in a text [message #1731768 is a reply to message #1731723] Tue, 10 May 2016 02:01 Go to previous message
Eclipse UserFriend
Well spotted Dominik! Thanks Smile
Previous Topic:Testexec issue. No valid Java JRE was specified
Next Topic:Testing different DPI Scalings
Goto Forum:
  


Current Time: Sat Jul 12 10:39:57 EDT 2025

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

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

Back to the top