Issue on opening a page with serenity/cucumber - cucumber-java

I'm trying to open a page in the StepDefinition class by calling the open() method of the PageObject class.
The problem is that after this method is called it doesn't go to the instructions after:
homeSteps.openPage();
//the following instructions are not called
createOrganizations();
Can you help me please to resolve this issue?

Related

include validation service in codeigniter4 failed

i try to make my first form validation in codeigniter4.For that i've create a controller with a function to check the post-vars. At the beginning, ci4 need to load the libary, so i do it like in the docu
$validation = \Config\Services::validation();
For this i recieve the following error.
...
message "Class 'Myth\\Auth\\Authentication\\Passwords\\ValidationRules' not found"
file "mypath/system/Validation/Validation.php"
function "loadRuleSets"
class "CodeIgniter\\Validation\\Validation"
function "run"
class "CodeIgniter\\Validation\\Validation"
....
What i do wrong, or is there something to setup for a new project before it works?
omg
i've found the problem. in the app/config autoload.php and validation.php was a class "Myth" wich is not in use. SO i commet it out and the thinks works fine.

Call to a member function model() on a non-object error on opencart 2.0

I am use <?php $this->load->model('tool/image'); ?> this on tpl file
i am getting this error Call to a member function model() on a non-object in /home/host/public_html/site/admin/view/template/module/module_name.tpl
any one please solve my problem
thanks
The error means that $this->load is not what you think it is.
I've looked at the docs briefly and the model property is available only inside the controller. You are trying to access it in the view. You need to pass the model object to the view.
Try this in the controller
$this->data['load'] = $this->load;
Then in the view you should be able to do this:
<?php $load->model('tool/image'); ?>
I solve this suppressing the load call, I believe that now thee tpl is executed in the load, then when you call $this->load, you are calling load in load.
If you put
$this->load->model('tool/image');
it should to work, at least it worked in my code...

Error calling method in java-class 'ClassA' 'org.my.ClassB' is incompatible with 'org.my.ClassB'

I have two classes org.my.ClassA and org.my.ClassB both classes are in the same package org.my in the WEB-INF/src in the same database.
ClassA has the method public add(org.my.ClassB newB){...}.
In SSJS I have a code block in which I call ClassA.add(ClassB) which normally works fine. Until some unknown point where the Server can't see that org.my.ClassB === org.my.ClassB and it returns the error (message translated from German maybe looks different in English version):
error calling method 'add(org.my.ClassB)' in java-class 'ClassA'.
'org.my.ClassB' is incompatible with 'org.my.ClassB'.
and it points to my line in the SSJS: ClassA.add(ClassB);
What I tried so far:
First I added the line importPackage(org.my); to my SSJS Code. No luck.
I tried to add another method add(Object newB) and then cast the object to ClassB but same result. The error does not seem to come from the java class its from the SSJS code because it cant find the method with an argument of the type org.my.ClassB. But if I test the object in the SSJS code it returns org.my.ClassB.
Then I tried to add the classpath to all variables in the SSJS block like: var newB:org.my.ClassB = new org.my.ClassB(). But same result after some time the application breaks with the same error.
From my Point of view it got to do something with the caching of compiled classes, or so because if I clear the database everything works just fine again.
Hope someone has a solution on this.
This is a class loader problem.
You can find more details about the issue in the answer from Frantisek Kossuth:
See here more details: Meaning of java.lang.ClassCastException: someClass incompatible with someClass

Overriding CDocument OnFileSave()

How do I do this? If you could please kindly include the code for message map and the function itself, that would be greatly appreciated.
EDIT:
More specifically I am wondering how OnFileSave() links to OnSaveDocument(LPCSTR lpszPathName)
How does OnFileSave get lpszPathName?
You don't need to do anything special to override OnSaveDocument(...) it's already a virtual function in CDocument, so your derived class can just declare virtual BOOL OnSaveDocument(LPCTSTR lpszPathName); in it's header, then implement it in the document. Nothing is needed in the message map. OnSaveDocument will be called by the framework as part of OnFileSave which is a handler in the base class for ID_FILE_SAVE. The lpszPathName refers to m_strPathName when called by OnFileSafe, which is set when opening a file or by calling SetPathName. If it's empty when saving, the user is prompted for a file name.
CDocument::OnFileSave is the message handler for the Save menu command. To handle it yourself put this in your document class message map:
ON_COMMAND(ID_FILE_SAVE, OnFileSave)
and add your function:
void CYOURDOCUMENT::OnFileSave()
{
CDocument::OnFileSave();
}
To see everything it does put a breakpoint in your function and start single-stepping.

Class init failed in newInstance call

I am continuously facing a situation of which I have no idea. I am tried to test one method that I have implemented in C++. I got an error, a Class init failed when calling newInstance .
It further states that cannot load library:reloc_library[1311]:33 cannot locate 'Z13trainFacePKcS0'... and suddenly it crashes and throw exception. It gives the same error. I will appreciate any help.
Regards,
Adonis.
You have loaded a library like this in the class which gets loaded during class initialization.
static {
System.loadLibrary("gamescript");
}
From your error you have posted, it seems the library cannot be located which means, it either is not present in the apk file or it is not inside the libs folder.

Resources