Skip to content

Tag: java

How can i set browser language in Selenide using Java?

Hello guys please how can i do it?When i run not headless mode browser is in english and everything works fine, but when i run headless mode language is changed to my native language. I am using this for headless mode. Answer Selenide Configuration class contains public static MutableCapabilities browserCapab…

Does this hashCode make sense?

I came across some an hashcode function that does kind of the following: I am not fully convinced of the method used to calculate the hashCode, I know use of prime numbers yields a better distribution in general. But in this implementation I am not really convinced that’s the case. For example assuming …

incompatible types: Object cannot be converted to Diff

I have this Java method which his used to compare data: But for this line for (Diff<?> diff : diffResult.getDiffs()) { I get error: So I have: Do you know how I can fix this issue? P.S unfortunately the problem is not solved. I created this small example code: https://github.com/rcbandit111/hateos_poc/b…

MapStruct. Mapping fields of list element by expression

Good afternoon! There is an object that contains field as type List, is it possible to set each (some) field of type T, by values generated in the annotation by the expression parameter? For example: Target object: Mapper interface: How can such an idea be implemented? In the documentation, I found only examp…