Getting space instead of + during filter, - filter

I am trying to apply filter for email, whenever I am trying to filter and pass "+" (plus sign) as an argument in angular 2, It passes whitespace instead of that. Why so? I tried using EncodedURI but It didnt worked.

URLEncoded should be true in order to do that.
try UrlEncoded:true

Related

How to get the required value from the existing value when there is no suffix?

I'm trying to use regular expression extractor concept in Jmeter. By using regEx concept I'm able to get the required token id's. And for all I'm using regEx as (.*?). So this is working fine when we have constant prefix and suffix text/values.
But in this case, there is no suffix,
Ex: Key is = #bluerelay.com/a43a816dcdd14873bd5757b3a3709d5c,
ClickHereForImageForm
I want to take the key ID into a variable with using RegEx. I have tried to get it with (.*?) but it didn't work, it returns the full value, not the required part. It'd be excellent if you could give any suggestion.
The source value is:
https://navitus-internal-app.bluerelay.com/#/token/systemadministrator#bluerelay.com/a43a816dcdd14873bd5757b3a3709d5c
The expected result is to extract a43a816dcdd14873bd5757b3a3709d5c from the above URL and put it into a variable.
You can use regex to get last text after / sign
(.*)\/(\w+)
See demo

cy.contains match with regex?

I am trying to match part of a url http://www.mywebsite.com/get-stuff in cypress and haven't been able to figure out how to code a regex match.
I tried:
cy.contains('http.*get-stuff')
and don't find a match for
do some things
If you are trying to see if some content on your website has the text http://www.mywebsite.com/get-stuff using regex, you will need to pass in a valid Regular Expression. Your argument is attempting to match using a glob expression.
If you are trying to see if the url of your website is navigated to http://www.mywebsite.com/get-stuff, you likely want to write an assertion off of the cy.url() command like so:
cy.url().should('match', /myregexp/)
I know it's been quite a long, but for those who are still looking for a solution ( just like me ), you can make use of cy.url().should('contain', /regex/) if the accepted solution didn't work for you.
This solution should work too:
cy.get('div') // select DOM element (tag, class or id)
.invoke('text') // check the innerHTML text
.should('match', /regex/) // compare with a regular expression
More on:
https://docs.cypress.io/api/commands/invoke

Using IN operator at tablix filters issue

I'm trying to add a filter with IN operator to my tablix. Problem is , my criteria values are already comma separated like A,B and C,D. Writing them like " 'A,B','C,D' doesn't seem to work.
I couldn't manage to get the filter working and all other questions/examples are for single word criteria. Any help?
I managed to fix this issue on my own by using a =split("2B,2C",",") function and changing the split notation (the last ,) to something other than a comma. Works very fine.
I hope this would help and save time for other people in future.

Request::getQueryString() without some parameters

I am using the following code to append the query strings with two links. But I want to exclude the page parameter of pagination from the query string.
<li>Teachers</li>
<li>Courses</li>
What is the way to do it? I tried the following code but it generates error.
<li>Teachers</li>
<li>Courses</li>
Well getQueryString() just returns a string. Instead you can use Request::except() directly and then call http_build_query() to generate the query string:
<li>Teachers</li>
Note that if you have POST values, those will be included too. If you want to avoid that do this:
<li>Teachers</li>

Elasticsearch URI based query with AND operator

How do I specify AND operation in URI based query? I'm looking for something like:
http://localhost:9200/_search?q="profiletype:student AND username:s*"
For URI search in ElasticSearch, you can use either the AND operator profiletype:student AND username:s, as you say but without quotes:
_search?q=profiletype:student AND username:s*
You can also set the default operator to AND
_search?q=profiletype:student username:s*&default_operator=AND
Or you can use the + operator for terms that must be present, i.e. one would use +profiletype:student +username:s as query string. This doesn't work without URL encoding, though. In URL encoding + is %2Band space is %20, therefore the alternative would be
_search?q=%2Bprofiletype:student%20%2Busername:s*
According to documentation, it should work as you described it. See http://www.elasticsearch.org/guide/reference/query-dsl/query-string-query.html
That said, you can also use the following:
http://localhost:9200/_search?q="+profiletype:student +username:s*"
You can try bellow line.
http://localhost:9200/_search?q=profiletype:student%20AND%20username:s*
http://localhost:9200/_search?q=profiletype:student AND username:s*
i had to combine the default operator and + sign to make it work
curl -XGET 'localhost:9200/apm/inventory/_search?default_operator=AND&q=tenant_id:t2+_all:node_1'

Resources