Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page source is raw and not rendered #49

Open
Jiyvn opened this issue Mar 21, 2024 · 6 comments
Open

Page source is raw and not rendered #49

Jiyvn opened this issue Mar 21, 2024 · 6 comments

Comments

@Jiyvn
Copy link

Jiyvn commented Mar 21, 2024

Issue

page source is raw and not rendered e.g.
lgtv.txt

image

code

BaseOptions options = new BaseOptions()
      .amend("appium:deviceName", "lg2019")
      .amend("platformName", "lgtv")
      .amend("appium:automationName", "webos")
      .amend("appium:deviceHost", "192.168.10.187")
      .amend("appium:noReset", false)
      .amend("appium:app", "/Users/jiyvn/aviu/apps/com.viu.tv_4.1.0_all.ipk")
      .amend("appium:appId", "com.viu.tv")
      .amend("appium:chromedriverExecutable","/Users/jiyvn/aviu/apps/tv/chromedriver/chromedriver_2.36")
      .amend("appium:rcMode", "js")
      .amend("appium:useSecureWebsocket", false);

driver = new AppiumDriver(new URL("http://127.0.0.1:4723"), options);
// sleep for a while
driver.getPageSource();

version info

  • webos@0.3.0 [installed (npm)]
  • appium 2.5.1
  • webOS TV CLI Version: 1.12.4-j27
  • LGTV:
    • modelName : 43UM7600PCA
    • sdkVersion : 4.10.0
    • firmwareVersion : 05.40.20

the same problem in tizen tv

@Jiyvn
Copy link
Author

Jiyvn commented Apr 1, 2024

found an prompt in page source You need to enable JavaScript to run this app. How could I enable the javascript with appium and lg driver? @KazuCocoa @jlipps
image

@KazuCocoa
Copy link
Contributor

Could you share the full appium log?

@Jiyvn
Copy link
Author

Jiyvn commented Apr 1, 2024

@KazuCocoa sorry, found that it's partially rendered, especially the text part we want.
image

appium server log: https://gist.github.com/Jiyvn/ce89496bd1c914df08cc8bb79ff213ba
page:
image

page source: https://gist.github.com/Jiyvn/65836fe427614958fcc14ddb6d104e99

@jlipps
Copy link
Collaborator

jlipps commented Apr 1, 2024

What happens when you wait for some time for the source to be updated? At any rate we get the source from chromedriver, so there's probably not much we can do here.

@Jiyvn
Copy link
Author

Jiyvn commented Apr 2, 2024

@jlipps the same result. But I confirmed with our dev, as the app on LG TV runs with File protocol, the js is the source file that should not affect the page source at that moment, but it is not guaranteed

@jlipps
Copy link
Collaborator

jlipps commented Apr 2, 2024

It's not a surprise that the noscript tag is there. It's always there in the source. I'm still not sure what you're saying the problem is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants