Hello there,
I am trying to setup a script to help me to click multiple places on a page, enter the price of my product, then save changes. However each product I have lots of different items, so the text “Edit Product Info” is on the page multiple times. The HTML code puts the active button in Unfortunately each product has a different number there, so I can’t tell it to go to that link. Is there a way to tell AS to press “Edit Product Info” then change price, and save?
Thanks so much,
Lorne
Model: MacBook Pro
Browser: Safari 537.1
Operating System: Mac OS X (10.7)
I found this script:
tell application "Safari"
open location "http://google.com"
delay 1
do JavaScript "document.forms[0]['btnI'].click()" in front document
end tell
But that’s obviously for google. However my buttons since I have multiple of them, are titled the same id in this code:
<font class="buttonBasicText">
So since I have 31 products on this page, I have 31 font tags with the same class.
Thoughts?
Thanks,
Lorne
Hi,
sorry, parsing websites depends strongly on the source code and scripting is a lot of trial & error
so it’s pretty hard to help in this case.
I’m wondering, if the site contains your products that implies you own the site,
you have access to the database (probably a mysql database).
Then a php script might be the better solution to change the values directly in the database.
Hello Stefan,
Thanks for the reply. Unfortunately no I do not own the site. These products are posted in my suppliers site. I.E. T-shirt printer’s site. I just post my products and the commisions, then link to that product and people checkout through my printer.
Make sense?
Is there any information I can try to provide to get help, cuz I don’t know AppleScript really at all so I don’t know where to start on this one.
Thanks,
Lorne