Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 22:10 Go to next message
Irena Drapalikova is currently offline Irena DrapalikovaFriend
Messages: 10
Registered: March 2016
Junior Member
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 06:59 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
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 08:44 Go to previous messageGo to next message
Irena Drapalikova is currently offline Irena DrapalikovaFriend
Messages: 10
Registered: March 2016
Junior Member
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 273 times)
Re: Check that a specific string is not in a text [message #1728254 is a reply to message #1728228] Fri, 01 April 2016 10:46 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
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 14:58 Go to previous messageGo to next message
Irena Drapalikova is currently offline Irena DrapalikovaFriend
Messages: 10
Registered: March 2016
Junior Member
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 1136 times)
  • Attachment: app.PNG
    (Size: 52.00KB, Downloaded 1090 times)
  • Attachment: app2.PNG
    (Size: 37.29KB, Downloaded 1081 times)

[Updated on: Fri, 01 April 2016 15:05]

Report message to a moderator

Re: Check that a specific string is not in a text [message #1728394 is a reply to message #1728278] Mon, 04 April 2016 07:17 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
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 12:31 Go to previous messageGo to next message
Irena Drapalikova is currently offline Irena DrapalikovaFriend
Messages: 10
Registered: March 2016
Junior Member
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] Tue, 05 April 2016 01:52 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
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 18:52 Go to previous messageGo to next message
Irena Drapalikova is currently offline Irena DrapalikovaFriend
Messages: 10
Registered: March 2016
Junior Member
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 855 times)

[Updated on: Tue, 05 April 2016 18:53]

Report message to a moderator

Re: Check that a specific string is not in a text [message #1728621 is a reply to message #1728603] Wed, 06 April 2016 01:23 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
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 07:51 Go to previous messageGo to next message
Irena Drapalikova is currently offline Irena DrapalikovaFriend
Messages: 10
Registered: March 2016
Junior Member
with single quotes
index.php/fa/25549/0/
  • Attachment: err.PNG
    (Size: 16.29KB, Downloaded 828 times)

[Updated on: Wed, 06 April 2016 11:29]

Report message to a moderator

Re: Check that a specific string is not in a text [message #1728672 is a reply to message #1728638] Wed, 06 April 2016 11:44 Go to previous messageGo to next message
Oliver Goetz is currently offline Oliver GoetzFriend
Messages: 219
Registered: May 2011
Senior Member
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 11:54 Go to previous messageGo to next message
Irena Drapalikova is currently offline Irena DrapalikovaFriend
Messages: 10
Registered: March 2016
Junior Member
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 08:34 Go to previous messageGo to next message
Oliver Goetz is currently offline Oliver GoetzFriend
Messages: 219
Registered: May 2011
Senior Member
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 13:24 Go to previous messageGo to next message
Irena Drapalikova is currently offline Irena DrapalikovaFriend
Messages: 10
Registered: March 2016
Junior Member
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 11:33 Go to previous messageGo to next message
Oliver Goetz is currently offline Oliver GoetzFriend
Messages: 219
Registered: May 2011
Senior Member
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 14:35 Go to previous messageGo to next message
Dominik Gabriel is currently offline Dominik GabrielFriend
Messages: 113
Registered: June 2013
Senior Member
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 06:01 Go to previous message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
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: Thu Sep 19 23:39:08 GMT 2024

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

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

Back to the top