JNIEXPORT jstring JNICALL Java_org_openqa_selenium_ie_InternetExplorerElement_getAttribute (JNIEnv *env, jobject obj, jstring attributeName) { ElementWrapper* wrapper = getWrapper(env, obj); const wchar_t* converted = (wchar_t*) env->GetStringChars(attributeName, NULL); return wstring2jstring(env, wrapper->getAttribute(converted)); }