Load URL doesn't work for WebView element if the scene is not hidden/unhidden first
Source: https://www.reddit.com/r/tasker/comments/17d0dbq/load_url_doesnt_work_for_webview_element_if_the/
I'm building a project where I use the WebView element on scenes, and I noticed a possible bug that I wasn't aware about it until now.
Basically, I'm visiting www.google.com on first scene launch, using the Load URL option of the Element Web Control action. It works as expected.
The problem comes when you have an action (ie: scene button) that call the same base URL, and use it to reload the page when the scene is just created. Just like what the Home Button of a web browser does. Here, to make it work, you need include another Web Control action before the main one, but it will load a different site instead.
Example of usage:
-
Try creating a simple scene with a single scene element.
-
Create a task to launch the scene, and add the Web Control action with the Load URL option, and write a base URL that you would like it to load on first scene open. Example: www.google.com
-
Navigate to whatever site you would like.
-
Try calling the Web Control (separate button on the scene) to load the same base URL from step 2, without destroying/hidding the scene.
-
Now you should be aware of the bug.
Can you confirm such behavior?