Hamcrest locators espresso - hamcrest

I have id for 2 elements(id:ib_done_card_name, id: et_card_name), but I can't locate them anyway. I have the error "matches multiple views in the hierarchy". I don't see anything else with the same id.
I was trying to use that matcher, but it didn't work.
onView(allOf(hasDescendant(allOf(withId(R.id.et_card_name), withParent(hasDescendant(withText("List")))))))
id:ib_done_card_name
et_card_name

Related

Using IN operator OData 4.0 "Bad Request" FetchXML Builder xrmtoolbox

By using FetchXML Builder in Xrmtoolbox I have an OData 4.0 string:
.../contacts?$filter=(searchable eq true)
or (contains(firstname, '%25firstName%25)'
or contains(lastname, '%25lastName%25')
or Microsoft.Dynamics.CRM.In(PropertyName= '_accountid_value', PropertyValues=['00000000-0000-0000-0000-000000000000','c198b30d-8d4e-eb11-a812-000d3ab5acdf','6c9caaac-a755-eb11-a812-0022489b9c9c'])
or Microsoft.Dynamics.CRM.In(PropertyName= 'contactid', PropertyValues=['00000000-0000-0000-0000-000000000000','30262317-0a83-eb11-a812-000d3ab02826']))
I have manually changed "and" to "or" in the query, so I am afraid it is just a small detail that I have missed. However, I have never used the IN operator with this tool before and am therefore worried it might be an issue with the way I use it/I have done something wrongly.
How do I know there is an issue with the string?
The image below shows the code in C# when I am trying to fetch the data. This is where I can't get through because I get "Bad request" from the HTTPClient.GetAsync method. I know that the method call is not the problem because I do this in several other places, and can therefore only assume it is the OData string. I have also got "Bad request" before and fixed it making the OData string correct.
Has anyone else had this issue or know what is wrong with the OData string that I am overlooking?
Edit:
I checked the docs linked by #PanagiotisKanavos. Unfortunately this also gives my "Bad request".
".../contacts?$filter=(searchable eq true) or (contains(firstname, '%25Mat%25)' or contains(lastname, '%25son%25') or _accountid_value in ('c198b30d-8d4e-eb11-a812-000d3ab5acdf','6c9caaac-a755-eb11-a812-0022489b9c9c') or contactid in ('30262317-0a83-eb11-a812-000d3ab02826'))"

Xamarin.Android binding generation giving "Type X was not found" errors for classes new in JDK 1.8

I'm trying to get Xamarin.Android to generate bindings for a library supplied as an AAR. JAR2XML is giving me a lot of "can't find type" errors, so I thought I'd try class-parse, but in addition to some library references I'm trying to track down, I'm getting a couple of these:
1> Error while processing '[Method] java.time.temporal.Temporal adjustInto(java.time.temporal.Temporal temporal, long newValue)' in '[Class] java.time.temporal.ChronoField': Type 'java.time.temporal.Temporal' was not found. (TaskId:69)
1> Error while processing '[Method] java.time.temporal.Temporal addTo(java.time.temporal.Temporal temporal, long amount)' in '[Class] java.time.temporal.ChronoUnit': Type 'java.time.temporal.Temporal' was not found. (TaskId:69)
Now, java.time.temporal.Temporal is a new type in JDK 1.8, so I'm wondering if maybe that's part of my problem here (ie. maybe the types that can't load are using other new-in-1.8 types). Running bin\javac -version in the path specified in Options-Xamarin-Android Settings says I'm using "1.8.0_172". My project is targeting "Android 8.1 (Oreo)" - ie. api level 27. Is there some other option I need to set to make sure I'm using 1.8?

Drupal 8 issue: InvalidArgumentException: The URI '' is invalid

I am struggling with this issue:
InvalidArgumentException: The URI '' is invalid.
You must use a valid URI scheme. in Drupal\Core\Url::fromUri()
(line 284 of core/lib/Drupal/Core/Url.php).
How can I fix this?
You are passing a blank uri into the method. It is complaining about missing a scheme (eg. http:// or https://, or an internal scheme eg: internal:/)
So either you are explicitly passing a blank, or something isn't being set correctly. However, it does not seem to be null.
I had similar issue in Drupal 8 site, please make sure your files directory path is set correctly
I my case files path was Private and it was not configured in settings.php.
$settings['file_private_path'] = 'sites/default/files/private';
From the looks of the source code for the fromUri() function it would appear as though it throws that error when the PHP parse_url function returns an empty scheme:
... elseif (empty($uri_parts['scheme'])) { throw new \InvalidArgumentException("The URI '$uri' is invalid. You must use a valid URI scheme."); ...
From what I can gather in your question you seem to be providing an empty/null value to the fromUri method which is in turn causing the script to error when it attempts to parse the value. So I'd imagine that you'd need to do some kind of check before passing it to the fromUri function.
An example of how to use this method is helpfully provided in the comments section of the fromUri page: https://api.drupal.org/comment/61905#comment-61905
In case your URI is public://, then use:
\Drupal::service('file_url_generator')->generate($file->getFileUri())

Incorrect <title> tag found by Geb in Grails app

The page title is "Page1" (https://github.com/biomq/geb-example-grails/blob/master/grails-app/views/person/page1.gsp#L8), but the Page DSL is checking for a title of "Person List" (https://github.com/biomq/geb-example-grails/blob/master/test/functional/pages/LinkPage1.groovy#L9).
To run tests:
grails -Dgeb.env=firefox test-app functional:
If you edit LinkPage1's title ==~ /Page1/ to the incorrect value title ==~ /Person List/ [as it is now, in the repo] while leaving Page1 in page1.gsp, the test passes! The test failure then occurs further down with 'testLink' "page content not found".
If you edit person/page1.gsp and replace g:link controller="Person" action="page2" id="testLink" ... with a href="/person/page2" id="testLink"... i.e. provide an explicit testLink id, and use testLink { $("#testLink") } in LinkPage1.groovy, the page content not found error persists.
hmmmm...
It should be to LinkPage1 and not at LinkPage1 here if you want to go to /person/page1.gsp. Have a look at the Book of Geb, the difference between at() and to() is described there.

symfony sfDoctrineRouteCollection routing throws 404 error "Empty module and/or action after parsing the URL..."

I have the following routing configuration:
entry:
class: sfDoctrineRouteCollection
options:
model: ProjectEntry
module: entry
prefix_path: /entry
column: slug
with_show: false
model_methods:
{ object: getEntryBySlug }
requirements:
slug: \w+
which, among others, gives me the following output with the symfony app:routes :
entry_edit GET /entry/:slug/edit.:sf_format
at lib/model/doctrine/ProjectEntryTable.class.php I have the following method:
public static function getEntryBySlug($parameters)
{
return Doctrine_Core::getTable('ProjectEntry')->findOneBySlug($parameters['slug']);
}
However, when I enter an URL such as:
frontend_dev.php/entry/my-slug/edit
I get the following error:
404 | Not Found | sfError404Exception
Empty module and/or action after parsing the URL "/entry/my-slug/edit" (/).
(assume that my-slug is a valid slug for some record at ProjectEntry table)
I haven't found the cause of this error, what may I be doing wrong?
As far as I can tell, the problem is at the routing configuration (but where?!), because even if I try to debug something at my executeEdit action, I notice that I don't even get there. (If it's needed, I can post more code/output here...)
Any ideas deeply appreciated...
Ok, got it!
I just had to remove the requirement for the slug and that was it.
The thing is that sfDoctrineRouteCollection (and maybe other sfObjectRouteCollections? anyone knows?) generates its routes, like the edit one, as:
prefix/column/edit
so if column has a \w+ requirement, it is basically saying that anything after the prefix is part of the column, including the '/edit' part. Removing the requirement loads the default one ([^ / \ \ .]+), which as far as I understand of regexes says that the next '/' is the limit...
sorry for such a newbie question, but it is now solved...

Resources