• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Safari - do JavaScript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Safari - do JavaScript


  • Subject: Re: Safari - do JavaScript
  • From: Emmanuel LEVY <email@hidden>
  • Date: Tue, 02 Dec 2014 23:16:55 +0100

I am not a specialist, but I think that document.getElementsByClassName('flex-active-slide') returns an array of nodes, which doesn't have a innerHTML method.

I would try for instance: document.getElementsByClassName('flex-active-slide')[0].innerHTML

Emmanuel

On Dec 2, 2014, at 2:53 PM, white-island.org wrote:

> The reply posted earlier was from another, wrong scripted  try…
> This one is right:
>
> tell application "Safari"
> 	get current tab of window 1
> 		--> tab 1 of window id 64
> 	do JavaScript "document.getElementsByClassName('flex-active-slide').innerHTML" in tab 1 of window id 64
> 		--> missing value
> end tell
> (*missing value*)
>
> I really tried a lot of things on the DOM and nothing gives.
>
> Its also notable that Safari doesn’t understand „show“.
> Whys that?
>
> Cheers
>
> Klaus G. Umland
>
>
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list      (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden


References: 
 >Safari - do JavaScript (From: "white-island.org" <email@hidden>)

  • Prev by Date: RE: [rant] "Never mind the quality, feel the width!"
  • Next by Date: Safari - do JavaScript
  • Previous by thread: Safari - do JavaScript
  • Next by thread: Safari - do JavaScript
  • Index(es):
    • Date
    • Thread