How can i verify if any text is present in text field in selenium IDE - selenium-ide

I want to verify if text field is empty or not. I was using verifyEval command but its throwing an exception. How can i resolve that or is there any other way to do that?

Use the command verifyNotText against your locator and leave the value field blank. That should verify that there is some text present. If you want to confirm it is blank then it's just the same using verifyText instead.

Related

Remove spaces from multi select checkbox in mail body

I have a powermail form in which I use a select box with multi selection.
In the email body the selected values are written as a comma separated list but with a space after each comma.
The developer of powermail (powermail 7.4.2 / TYPO3 9.5) has given me an answer on github: https://github.com/einpraegsam/powermail/issues/680
He directed me to an hardcoded entry in the answer.php of powermail.
I've changes the line in the answer.php to my needs but the spaces in the e-mail remain.
Can anyone give me a tip how to remove these spaces in the mail body for the multi select value list?
First question after code changes:
have you cleared all caches?
Then you need to verify that this line of code is responsible for your spaces. change the default delimiter to something new (like: '#').
Differentiate between the default value of this function and the value which is transmitted when the function is called. You could change the default value, but if the function is called with the old value it will override the changed default.
If that doesn't help you need to debug where your values got concatenated. That could be in FLUID, Typoscript or PHP.

PHP Eclipse - Do not select $ when selecting PHP Variable

I have recently been using PHP Eclipse and have got everything set up the way i like it with just one exception.
When i double click on a variable it also highlights the $ which makes it difficult to move to the next occurrence if it is later used without the $ as part of $this as an example.
Does anybody know how or if this can be achieved?
Just use Ctrl-F and search for the exact text you want.

Cannot remove line when blank

I have checked Remove Line When Blank and set Print When Expression $F{item} !=null.
But the row cannot remove when the data is null.
The code is quite long, I can provide the design layout first,
If you want i can send you my jrxml file, thanks~
I remember I did not have this problem before, but somehow it appear.
The option Remove Line When Blank should be remove field when field data is blank or null, but it didn't works.
Then I search on Google, finally solved the problem:
the option only operates when the field2 don't touch field3.
Maybe you should set positiontype on Float...
naturally it works...:cheer:
From link: Remove Line When Blank?
It's because I have adjusted the positions of fields.
The field that I checked Remove Line When Blank option is touch another field, so it don't works.
when I drag the field in the iReport software make sure they don't touch each other, the problem solved.
You must be receiving empty strings (i.e. of length zero) instead of proper field values or null. The empty string also passes your print when check since "" != null is true.
You either have to:
Alter you print when expression to account for empty strings or
Convert incoming empty strings to null in the field expression like so
$F{field_name} == null ? null : $F{field_name}.isEmpty() ? null : $F{field_name}

Find and replace using wildcard in netbeans

How would one go about using replace in netbeans to modify a PHP script with lots of $_POST[].
For better security it would be a good idea to replace all these $_POST[]
with sanitize($_POST[]) where sanitize is a function that sanitizes user input.
So I could use Replace and search for $_POST[''] and replace with sanitize($_POST['']).
But how do you keep the variable name within each $_POST[''] while adding the closing parenthesis?
For example $_POST['name'] and $_POST['action'] need to become sanitize($_POST['name']) and santize($_POST['action']) respectively.
I am not a PHP programmer or a Regex master but in my very limited test this seemed to work.
Select the project and then choose Edit -> Replace. Choose "Regular Expression" in the drop down list, set containing text to \$_POST\[(.*)\]and replace with to sanitize(\$_POST[$1])

how to insert new line in eclipse using Preference and formatter?

I am trying to format my code in a way to leave a line whenever i enter once. I go to Window->Preferences->Java->Code Styles ->Formatter .. Created my own profile . but still can't get a way to format my code in such a way.. I have went through the option but still can't find a way to make my code like this.. assist me in this matter. Each statement must leave a line when i pressed CTRL+SHIFT+F.
You'll have to manually insert the blank lines where you want them; the formatter has no capability to insert lines between statements.
In your Formatter profile, go to the Blank Lines tab and check the value of Number of blank lines to preserve.