WebView и google.ru login

Это русская секция форума wxWidjets. В этой секции вы можете обсуждать любые вопросы, связанные с wxWidgets на вашем родном языке.
Post Reply
User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 425
Joined: Fri Dec 09, 2016 7:28 am
Contact:

WebView и google.ru login

Post by cutecode »

Приветствую!

Из примера WebView в samples
не могу залогиниься в google.ru.
Выдает ошибку

Code: Select all

Попробуйте сменить браузер. 
Если вы уже используете поддерживаемый браузер, 
обновите страницу и попробуйте войти ещё раз.
Хотя в других браузерах такой ошибки нет.

Можно ли как то обойти эту проблему?

Спасибо
wx 3.1.6 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru
User avatar
doublemax
Moderator
Moderator
Posts: 19103
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: WebView и google.ru login

Post by doublemax »

Which platform and webview backend?

I assume it's Windows with IE backend. Goto https://www.whatismybrowser.com/ and check what it displays. If it says Internet Explorer 7, call wxWebViewIE::MSWSetEmulationLevel() to raise it to 11.

https://docs.wxwidgets.org/trunk/classw ... 6449a1f3bd
Use the source, Luke!
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: WebView и google.ru login

Post by ONEEYEMAN »

Hi,
Also - you may switch to using Edge and see if that helps.

Thank you.
User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 425
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: WebView и google.ru login

Post by cutecode »

hello.
I called MSWSetEmulationLevel(wxWEBVIEWIE_EMU_DEFAULT)
And still java scrypt is not enabled
and still have this response

Code: Select all

Возможно, этот браузер или приложение небезопасны. Подробнее…

Попробуйте сменить браузер. Если вы уже используете поддерживаемый браузер, обновите страницу и попробуйте войти ещё раз.
this is my link https://www.whatismybrowser.com/w/3HL2SDG

and code

Code: Select all

#if defined(__WXMSW__)
      #include "wx/msw/webview_ie.h"
      #define _MY_WEB_BROWSER_CLASS_ wxWebViewIE
#else
     #define _MY_WEB_BROWSER_CLASS_ wxWebView
#endif

class dChild_web : public dChild
{
    _MY_WEB_BROWSER_CLASS_* m_browser;

Code: Select all

bool dChild_web::precreate_controls()
{
	m_browser = (_MY_WEB_BROWSER_CLASS_*) _MY_WEB_BROWSER_CLASS_::New(wndPage, wxID_ANY, m_url);

#ifdef __WXMSW__
	m_browser->MSWSetEmulationLevel(wxWEBVIEWIE_EMU_DEFAULT);
#endif
I used latest wx 3.1.6
wx 3.1.6 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7449
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: WebView и google.ru login

Post by ONEEYEMAN »

Hi,
Are you able to use IE to login?

I.e. open IE from Windows, go to the page in question and receive the login prompt?

Thank you.
User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 425
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: WebView и google.ru login

Post by cutecode »

да
wx 3.1.6 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru
User avatar
doublemax
Moderator
Moderator
Posts: 19103
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: WebView и google.ru login

Post by doublemax »

Try wxWEBVIEWIE_EMU_IE11 instead of wxWEBVIEWIE_EMU_DEFAULT.

Are you using your own application or the "webview" sample for testing? If it's your own, also try with the sample.
Use the source, Luke!
User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 425
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: WebView и google.ru login

Post by cutecode »

doublemax wrote: Fri Jul 02, 2021 7:17 am Try wxWEBVIEWIE_EMU_IE11 instead of wxWEBVIEWIE_EMU_DEFAULT.

Are you using your own application or the "webview" sample for testing? If it's your own, also try with the sample.
Hello

As I wrote before, this link https://www.whatismybrowser.com/w/3HL2SDG
shows that I have EI 11

Code: Select all

Internet Explorer 11 on Windows 7
Internet Explorer 7 Compatibility View
IS THEIR WEB BROWSER UP TO DATE?
✓ Their web browser is up to date.
Yes, I did it on my own application
Changing from wxWEBVIEWIE_EMU_DEFAULT to wxWEBVIEWIE_EMU_IE11 did the same affect

Now, I'll try to use the sample application

Anyway, I think problem is in enabling JavaScript, but I don't know how to do it

Thank you
wx 3.1.6 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru
User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 425
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: WebView и google.ru login

Post by cutecode »

Hello!

I still cant loggin from sample application too

Code: Select all

Не удалось войти в аккаунт
Возможно, этот браузер или приложение небезопасны. Подробнее…
Попробуйте сменить браузер. Если вы уже используете поддерживаемый браузер, обновите страницу и попробуйте войти ещё раз.

my web browser's unique URL is
whatismybrowser.com/w/6RSRY5A

the sample is attached
I used confiration DLL_debug x86
Attachments
webview.zip
(42.11 KiB) Downloaded 235 times
wx 3.1.6 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru
User avatar
cutecode
Super wx Problem Solver
Super wx Problem Solver
Posts: 425
Joined: Fri Dec 09, 2016 7:28 am
Contact:

Re: WebView и google.ru login

Post by cutecode »

Вот надыбал

Code: Select all

How to sign in with a supported browser
To protect your account, Google may block login attempts from some browsers. This can happen if:

JavaScript support in the browser is disabled or missing;
Unsafe or unsupported extensions are installed in the browser;
the browser is controlled not by the administrator, but by special software;
the browser is embedded in another application.

wx 3.1.6 win/mac/linux

regards,
Alexander Saprykin
https://v2.dental-soft.ru
User avatar
doublemax
Moderator
Moderator
Posts: 19103
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: WebView и google.ru login

Post by doublemax »

This seems to depend on the OS. Under Windows7 Javascript works in the webview sample. Under Windows 10, with the same executable, it does not.

But i couldn't find where in Windows 10 you can change the setting.

Can you switch to the wxWEBVIEW_BACKEND_EDGE backend?
https://docs.wxwidgets.org/trunk/classw ... CKEND_EDGE
Use the source, Luke!
Post Reply