Logical operators in Selenium IDE - selenium-ide

I need to check value of an attribute in Selenium IDE. But the value can be "ABC" or "XYZ" randomly.
How to use OR operator to check if the value is valid?
I tried glob with | character, but it does not work:
verifyAttribute | xpath=.//*[#id='content']/div/div[3]/div[2]/div[1]/div[2]/a[1]#href | glob:(ABC)|(XYZ)
Thanks in advance.

You can use regex
verifyText | your ID here | regex:[ABC]|[XYZ]
<tr>
<td>verifyText</td>
<td>your ID here</td>
<td>regex:[ABC]|[XYZ]</td>
</tr>
This will match either ABC or XYZ exactly

Related

Computation of the number of uppercase letters in a string

I've bumped into a seemingly simple problem that I'm unable to solve. I would like to determine whether the number of uppercase letters is greater than the number of lowercase letter (ignoring special character, spaces etc).
Example
id | text | upper_greater_lower | note
------------------------------------------------------------------
1 | Hello World | False | because |HW| < |elloorld|
2 | The XYZ | True | because |TXYZ| > |he|
3 | Foo!!! | False | because |F| < |oo|
4 | BAr??? | True | because |BA| > |r|
My initial idea was to determine the number of lowecase letters, then uppercase letters, and finally, compare them. However, I'm unable to do so in any elegant and efficient way.
I expect handling ~30M rows with ~300 character each.
What would you suggest?
Thanks!
Using regular expression magic, that could be:
SELECT length(regexp_replace(textcol, '[^[:upper:]]', '', 'g'))
> length(regexp_replace(textcol, '[^[:lower:]]', '', 'g'))
FROM atable;

Drools Decision Table List

How can I make the list separated by comma formatted as "param1","param2","param3",.."paramN"?
Im using Decision Manager.
In Decision Table
+----------------------------------------------------+
| **Condition** |
+----------------------------------------------------+
| **productDescription in ($param)** |
+----------------------------------------------------+
| FITI,FMSG,MSGC,RUNT,BEAU,LING- |
+----------------------------------------------------+
On Source
when
productDescription in (FITI,FMSG,MSGC,RUNT,BEAU,LING)
I tried putting "$param" but returned
productDescription in ("FITI,FMSG,MSGC,RUNT,BEAU,LING")
Any help would be very much appreciated!
Thanks!
The answer to this is the function MemberOf. This will match your value to the array of values then will tag true if both fields are equal.

Selenium IDE - verifyText [error] Actual value '' did not match <acct name>

1st time post. I'm running a Selenium IDE script in which populated account information is supposed to be verified. I'm using verifyText to do this however I'm getting the error that the actual did not match the value I have set. In this case, I'm hardcoding the value because I know what to expect and I'm copying the value straight from the site. I've attempted to copy the values into a text editor to see if there are any hidden characters but haven't found any. There are 5 fields on the page this happening with.
Here is the IDE script for the rows and the logs. I've exchanged the actual client info with variables
<tr>
<td>verifyText</td>
<td>id=NAME_ON_ACCOUNT</td>
<td><AcctName></td>
</tr>
<tr>
<td>verifyText</td>
<td>id=ADDRESS_1</td>
<td><AcctAddress></td>
</tr>
<tr>
<td>verifyText</td>
<td>id=CITY_PROVINCE</td>
<td><AcctCity></td>
</tr>
<tr>
<td>verifyText</td>
<td>id=ZIP</td>
<td><AcctZip></td>
</tr>
<tr>
<td>verifyText</td>
<td>id=PHONE</td>
<td><AcctPhone></td>
</tr>
and here are the logs
[info] Executing: |verifyText | id=NAME_ON_ACCOUNT | <AcctName> |
[error] Actual value '' did not match '<AcctName>'
[info] Executing: |verifyText | id=ADDRESS_1 | <AcctAddress> |
[error] Actual value '' did not match '<AcctAddress>'
[info] Executing: |verifyText | id=CITY_PROVINCE | <AcctCity> |
[error] Actual value '' did not match '<AcctCity>'
[info] Executing: |verifyText | id=ZIP | <AcctZip> |
[error] Actual value '' did not match '<AcctZip>'
[info] Executing: |verifyText | id=PHONE | <AcctPhone> |
[error] Actual value '' did not match '<AcctPhone>'
You cannot get the text from an input field, but you can store its "value" attribute, then check that this value equals a certain text. For example:
storeAttribute | id=NAME_ON_ACCOUNT#value | nameValue
verifyEquals | ${nameValue} | <AcctName>

What is the most elegant way of describing textually a table

Here is the situation. I am working in epidemiological research and describing tables is something we have to do on a day-to-day basis. Content editing tools and their associated language all offers ways to describe a table. Here are a few example :
Latex
\begin{center}
\begin{tabular}{ c c c }
cell1 & cell2 & cell3 \\
cell4 & cell5 & cell6 \\
cell7 & cell8 & cell9
\end{tabular}
\end{center}
HTML
<table style="width:100%">
<tr>
<td>Jill</td>
<td>Eve</td>
</tr>
</table>
Markdown
| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
Some of these are clearer than others, but all of them start to look absolutely horrific once one try to modify their formating to something other than the most basic example.
My question is the following :
Given that this is one of the most fundamental tasks of text editing, what is the most elegant way/language we know to represent textually a non-trivial table and its content?

Where can I find the documentation for MicroStrategy Command Manager

Where can I find the documentation for MicroStrategy Command Manager? I've look through various docs that I have but not able to find any comprehensive list of commands. Particularly, I need to know a list of commands to create attributes and metrics.
Thanks
The best way to find the list of available commands is to use the Outlines option, available inside Command Manager.
To create an attribute use the following syntax:
CREATE ATTRIBUTE "<attribute_name>" [DESCRIPTION "<description>"] [LONGDESCRIPTION "<long_description>"] IN [FOLDER] "<location_path>" [HIDDEN (TRUE | FALSE)] ATTRIBUTEFORM "<form_name>" [FORMCATEGORY "<category_name>"] [FORMDESC "<form_description>"] [FORMTYPE (NUMBER | TEXT | DATETIME | DATE | TIME | URL | EMAIL | HTML | PICTURE | BIGDECIMAL | PHONENUMBER)] [REPORTSORT (NONE | ASC | DESC)] [BROWSESORT (NONE | ASC | DESC)] EXPRESSION "<form_expression>" [MAPPINGMODE (AUTOMATIC | MANUAL)] [EXPSOURCETABLES "<sourcetable1>" [, "<sourcetable2>" ...]] LOOKUPTABLE "<lookup_table>" FOR PROJECT "<project_name>";
and for metrics creation:
CREATE METRIC "<metric_name>" IN [FOLDER] "<location_path>" EXPRESSION "<expression>" [DESCRIPTION "<description>"] [LONGDESCRIPTION "<long_description>"] [HIDDEN (TRUE | FALSE)] [ALLOWSMARTMETRIC (TRUE | FALSE)] [REMOVEREPORTFILTERELEMENTS (TRUE | FALSE)] [TOTALSUBTOTALFUNCTION (AVERAGE | COUNT | DEFAULT| GEOMETRICMEAN | MAXIMUM | MEDIAN | MINIMUM | MODE | NONE | PRODUCT | STANDARDDEVIATION | SUM | VARIANCE)] [DYNAMICAGGREGATIONFUNCTION (AVERAGE | COUNT | DEFAULT| GEOMETRICMEAN | MAXIMUM | MEDIAN | MINIMUM | MODE | NONE | PRODUCT | STANDARDDEVIATION | SUM | VARIANCE)] [COLUMNALIAS "<columnalias>"] FOR PROJECT "<project_name>";
Some simple examples provided bellow (again from the outlines available inside command manager):
CREATE ATTRIBUTE "Day" DESCRIPTION "Duplicate of Day Attribute from folder \Time" IN FOLDER "\Schema Objects\Attributes" ATTRIBUTEFORM "ID" FORMCATEGORY "ID" FORMDESC "Basic ID form" FORMTYPE TEXT REPORTSORT ASC EXPRESSION "[DAY_DATE]" LOOKUPTABLE "LU_DAY" FOR PROJECT "MicroStrategy Tutorial";
CREATE METRIC "New Metric" IN FOLDER "\Public Objects\Metrics\Count Metrics" EXPRESSION "Count(Customer) {Country} <[Western United States Customers]>" FOR PROJECT "MicroStrategy Tutorial";
As Bruno said, the Outlines option gives you all the templates that there are in Command Manager, which you can build together and define to do what you want. If in doubt, check out the "MicroStrategy System Administration Guide" product manual, which covers all you need to know on command manager.
Here is one useful site with Command Manager documentation:
https://metacpan.org/pod/Business::Intelligence::MicroStrategy::CommandManager