Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
It's like a bug.
-
When I execute the code below, I cannot press the OK button.
Do you have the same symptoms?iPhone X(iOS12.4.1)
Pythonista 3 v.3.2(320000)import ui main = ui.ScrollView(frame=(0, 0, 375, 812)) main.content_size = (375, 812) wv = ui.WebView(frame=(0, 0,*main.content_size)) wv.load_url('https://www.google.co.jp/') main.add_subview(wv) main.present('fullscreen') wv.evaluate_javascript('alert("123");')
-
@tomomo For me, it works
iPad mini 4 iOS 13.2.3
Pythonista beta V3.3 build 330018 -
@tomomo, works for me as well, on an iPhone with the same screen size and same Pythonista version as yours, but on iOS 13.
Just to be sure, have you tried restarting your phone?
-
I tried rebooting, but I couldn't press the OK button.Is it because of iOS version 12.4.1?
-
iPhone 6S(iOS13.2.3)
Pythonista 3 v.3.2(320000)This worked.
So maybe the iOS version is a problem. -
@tomomo thus, just to be sure, you see the button and when you tap it, nothing happens?
-
Doh! So how do you get out? I had to close down the app. Lol
iOS 12.4.1
Pythonista 3.3 beta -
Since you cannot press the OK button, you can only delete the app from the task.
How can I use Pythonista 3.3 beta?
-
-
Thank you.
It ’s full. -
@tomomo this works on iPhone 5s iOS 12.4.3
Perhaps, you did not wait for the web page to be loaded before doing your alertimport ui main = ui.ScrollView(frame=(0, 0, 375, 812)) main.content_size = (375, 812) wv = ui.WebView(frame=(0, 0,*main.content_size)) wv.load_url('https://www.google.co.jp/') main.add_subview(wv) main.present('fullscreen') def x(): wv.evaluate_javascript('alert("123");') ui.delay(x,1)
-
@cvp I will try it.
-
@tomomo and, normally, you should use delegate of WebView
import ui class MyWebViewDelegate (object): def webview_did_finish_load(self, webview): wv.evaluate_javascript('alert("123");') main = ui.ScrollView(frame=(0, 0, 375, 812)) main.content_size = (375, 812) wv = ui.WebView(frame=(0, 0,*main.content_size)) wv.delegate = MyWebViewDelegate() main.add_subview(wv) main.present('fullscreen') wv.load_url('https://www.google.co.jp/')
-
@cvp Thank you for the several amendments.
I will try my best to change the contents of the alert dynamically.