Js callbacks #274
MishaKoval
started this conversation in
Requests
Replies: 1 comment
-
I, too, am trying to get the source of the downloaded page.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
What platform are you experiencing this issue on?
Windows
What architecture is your platform?
64-Bit
What version of UWB are you using?
Latest VoltstroUPM Release
What Unity version are you running?
2021.3.26f1
Describe what the issue you are experiencing is.
I try to read some data from html page in webView. I call ExecuteJs method and write something like that:
var data = document.GetElementByClassName("example");
if(...)
{
conlose.log("Have data");
}
And i use logger to reed messages from browser and check logs. But some js methods dont work like in usual browser.
Provide reproducible steps for this issue.
private void Test()
{
webBrowserClient.ExecuteJs("var displayValue = document.getElementById('successPage');var data = displayValue.getElementsByClassName('payment_receipt__description');for (let index = 0; index < data.length; index++) {console.log('Result' +data[index].textContent);}");
}
Any additional info you like to provide?
public class JsExecutor : MonoBehaviour
{
[SerializeField] private BaseUwbClientManager clientManager;
[SerializeField] private DataPrintToCheck dataPrintToCheck;
private WebBrowserClient webBrowserClient;
Beta Was this translation helpful? Give feedback.
All reactions