Hi all,
I am evaluating Eggplant for my employer. I would like to know it is possible to launch the terminal and open a browser and URL using sensetalk. This would be without actually record the terminal image and clicking it.
Thank you,
Joe
Hi all,
I am evaluating Eggplant for my employer. I would like to know it is possible to launch the terminal and open a browser and URL using sensetalk. This would be without actually record the terminal image and clicking it.
Thank you,
Joe
Without using images there are a couple of ways of doing what you ask. Since you’re running against a Mac, I would use this code:
TypeText F11 -- use Expose to reveal the desktop
Click (400, 400) -- click the desktop to make sure you're in the Finder
TypeText F11 -- exit Expose
TypeText commandKey, "u" -- open the Utilities folder
TypeText "Terminal" & return -- open Terminal
TypeText "open <URL>" & return-- opens URL in default browser
You could specify a browser if you needed to, but this gives you the general idea.
Hi EggplantMatt,
Thank you for the reply. I gave it a try and nothing happened on the SUT, script completed but no browser launched. Is there something I need to do to the SUT to allow terminal commands from eggplant?
Current work around:
I captured the image of the terminal and click on that. Not ideal way to do it but for now it should work.
Thank you,
Joe
I made a small but significant mistake. The keyboard shortcut for opening the Utilities folder is Shift + Command + u , not just “command + u”, so the code should be:
TypeText F11 -- use Expose to reveal the desktop
Click (400, 400) -- click the desktop to make sure you're in the Finder
TypeText F11 -- exit Expose
TypeText shiftkey, commandKey, "u" -- open the Utilities folder
TypeText "Terminal" & return -- open Terminal
TypeText "open <URL>" & return-- opens URL in default browser
Sorry for the inconvenience that mistake caused.
BTW, there are other terminal commands to open a URL in a specific browser such as Safari:
TypeText "open -a Safari http://apple.com/" & return