Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

How to allow my plugin on trusted sites (my sites) in firefoxProfile ?

  • 2 trả lời
  • 1 gặp vấn đề này
  • 1 lượt xem
  • Trả lời mới nhất được viết bởi cor-el

more options

I have a plugin "4game" and i try to test a site which uses this plugin. How i can allow launching and using this plugin in firefox ? It looks like there https://support.mozilla.org/en-US/kb/how-allow-java-trusted-sites

But i have to do it in my tests (webdriver) I tried to specify

               firefoxProfile.setPreference("plugins.click_to_play", true);
               firefoxProfile.setPreference("plugin.state.flash", 0);
               firefoxProfile.setPreference("plugin.state.4game", 2);

But it doesn't work for me

I have a plugin "4game" and i try to test a site which uses this plugin. How i can allow launching and using this plugin in firefox ? It looks like there https://support.mozilla.org/en-US/kb/how-allow-java-trusted-sites But i have to do it in my tests (webdriver) I tried to specify firefoxProfile.setPreference("plugins.click_to_play", true); firefoxProfile.setPreference("plugin.state.flash", 0); firefoxProfile.setPreference("plugin.state.4game", 2); But it doesn't work for me

Giải pháp được chọn

Are you saying that you need to do this in a fresh profile created just for the test?

If you can re-use an existing profile:

The easiest way is to watch for the plugin notification on the address bar (looks like a Lego block), click that, and use "Allow and Remember".

The next easiest way is to use the Page Info dialog's Permissions panel. When on the site hosting the content, you can open that using either:

  • right-click and choose View Page Info
  • (menu bar) Tools > Page Info
  • click the padlock or globe in the address bar > More Information

On the Permissions panel, you can "Allow" a specific plugin for the site.

Do any of those work for you?

If you cannot re-use an existing profile:

I doubt you will be able to do a site-specific exception, but yes, setting the plugin.state.identifier preference to 2 should allow all sites.

I don't know what the identifier is. Have you checked a running instance of Firefox to see whether it is simply 4game or it's another string?

Đọc câu trả lời này trong ngữ cảnh 👍 0

Tất cả các câu trả lời (2)

more options

Giải pháp được chọn

Are you saying that you need to do this in a fresh profile created just for the test?

If you can re-use an existing profile:

The easiest way is to watch for the plugin notification on the address bar (looks like a Lego block), click that, and use "Allow and Remember".

The next easiest way is to use the Page Info dialog's Permissions panel. When on the site hosting the content, you can open that using either:

  • right-click and choose View Page Info
  • (menu bar) Tools > Page Info
  • click the padlock or globe in the address bar > More Information

On the Permissions panel, you can "Allow" a specific plugin for the site.

Do any of those work for you?

If you cannot re-use an existing profile:

I doubt you will be able to do a site-specific exception, but yes, setting the plugin.state.identifier preference to 2 should allow all sites.

I don't know what the identifier is. Have you checked a running instance of Firefox to see whether it is simply 4game or it's another string?

more options

You can use a mozilla.cfg file in the Firefox program folder to specify new (default) values or to lock prefs.

Place a local-settings.js file in the defaults\pref folder where also the channel-prefs.js file is located to specify using mozilla.cfg.

pref("general.config.filename", "mozilla.cfg");

These functions can be used in the mozilla.cfg file:

defaultPref();	// set new default value
pref();		// set pref, but allow changes in current session
lockPref();	// lock pref, disallow changes

See: