-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
Description
Describe the bug
@Step annotation templating not supports this object reference in inner classes
Steps to Reproduce
Java Example:
public class A {
// Some code
public abstract class B {
private final SelenideElement switcher;
private final String switcherName;
protected B(By switcherContainer, String switcherName) {
switcher = $(switcherContainer).$(byClassName("MuiSwitch-switchBase"));
this.switcherName = switcherName;
}
@Step("Enabling '**this.switcherName**'")
public B enable() {
if (switcher.has(not(cssClass("Mui-checked")))) {
switcher.click(usingDefaultMethod()).shouldHave(cssClass("Mui-checked"));
log.debug("Clicked on '{}' switcher", switcherName);
log.info("'{}' was enabled", switcherName);
}
return this;
}
}
}Expected behavior
In this example the expected behavior will be correct naming for step with replaced value for this.switcherName
Actual behavior
In ReportPortal log showing like: Enabling 'this.switcherName' without replacing
Dependency versions
Report-Portal client version 5.1.20. I think the same for latest versions too.