Is that generally possible? Is the console able to format a link so that it is clickable? i.e. a link that launches an application, or anything else when clicked?
No, not unless your terminal supports it, and most terminals I know of don't support such a feature. If your terminal does support hyperlinks, read up on its documentation -- there's probably some escape sequence analogous to ANSI escape codes for doing so.
Actually, yes ✨ (kind of).
Select the URL in the Xcode console then you can find Open URL among services in the right-click context menu.
Related
I've made a couple small Safari extensions. For one of them, I would like to collect a set of user-entered strings (e.g., URLs or URL patterns) using a textarea in the settings screen. The only setting types offered in the documentation are one line text, check box, slider, select lists, and radio buttons. I could use a one line text field as an ugly workaround, but I'm hoping there's a better option. I've googled for hints and looked through Safari extensions in GitHub, but haven't found an example of anyone doing this yet.
Does anyone have an example of how to use a textarea for a Safari extensions setting? Is there an undocumented feature I've not been able to find? Or is there a way to trigger a custom popup window from the settings?
Thanks for any tips.
No, there is no way to build a more complex UI inside the settings dialog. What extensions typically do is add a button (checkbox, even if it's not quite the correct element) in the settings page which then launches a separate Safari page which contains the full settings UI, written in HTML.
For an example of this, install uBlock and take a look at how it launches its setting UI.
I am trying out Selenium with ChromeDriver to automate some audio/video tests.
But When I fireup the Chrome Browser with my app it asks me the question http:... wants to use your camera and microphone Allow Deny Options I want to click on Allow and proceed with the scripting on the site. But I cannot proceed without selecting Allow. Unfortunately Chrome pops up this question in a sort of Non-DOM format that I am not able to do a driver.findElement the obvious way and respond with a "click" on the "Allow" option. Has anyone of you encountered this situation and what is the best way to deal with this ?
Cheers !
-- Brian
See this answer (print dialog) or this answer ("Run As..." dialog).
Different dialogs, but the reason (in short, WebDriver can't handle these dialogs) and possible solutions are absolutely the same:
The Robot class, it allows you to "press" programatically anything on the keyboard (or clicking blindly) and therefore getting rid of the dialog by, say, pressing Enter or Esc. However, as told above, any advanced interaction is dependant on OS / language / printer.
// press Escape programatically - the print dialog must have focus, obviously
Robot r = new Robot();
r.keyPress(KeyEvent.VK_ESCAPE);
r.keyRelease(KeyEvent.VK_ESCAPE);
You can, of course, type anything via this class, too.
AutoIt. It's a Windows program useful for handling any system-level automation. Same dependancy as above.
Note that (as far as I know) you can't really check whether the dialog showed up or not, so you won't be able to catch a possible error if it runs on a computer without a camera...
If you're using a ChromeDriver you can get to any 'native' popups using
Alert popup = webDriver.switchTo().alert();
// here you can examine the text within the alert using popup.getText();
popup.accept();
I need to create a hotkey to select a menu item on a webapp. This is a drop down menu in the application page itself not a browser menu.
Details:
[ From my somewhat limited knowledge of javascript/html/css ]
From looking at the source it appears that the buttons are YAHOO.widget.Button styled li + a tags.
I can see the id of the element I wish to map a hotkey to. Is this something Autoit or AutoHotkey could do ...or are there better/easier ways? I don't want to send tabs and enter etc if avoidable. Can I directly access this element and trigger it with a hotkey?
Other:
Firefox or Chrome on Windows 7 ( IE not compatible with the app so not an option ).
Thanks!
The answer goes to Frank Farmer who answers in the comments above.
Greasemonkey will work for this and is vastly superior to AutoIt/AutoHotKey as I now have a cross-platform solution for our Mac and Linux users. And besides, why learn another language of limited use when you can just use JavaScript?
Thanks Frank!
I want to write code to log onto an Internet account and also click buttons to navigate to do different things such as watch for something to change. for example I would like
log on to account
click to navigate
while(until I say to stop)
watch for changes
You may look at
http://watij.com/
For automated website tests you can use Selenium.
You might not need to write code - if you use FireFox, perhaps try the iMacros addon?
You've not said what language you want to write this in -- for .NET there's http://watin.org/
Shell ("explorer.exe www.google.com")
is how I'm currently opening my products ad page after successful install. However I think it would look much nicer if I could do it more like Avira does, or even a popup where there are no address bar links etc. Doing this via an inbrowser link is easy enough
<a href="http://page.com"
onClick="javascript:window.open('http://page.com','windows','width=650,height=350,toolbar=no,menubar=no,scrollbars=yes,resizable=yes,location=no,directories=no,status=no'); return false")">Link text</a>
But how would I go about adding this functionality in VB?
If you want it to look professional, you need to use an actual browser component. VB.NET comes with one. If you are using an older version of VB, you'd need to go third party. If you want to stay with a shell open, you would have to individually target the browser command-line and pass arguments to indicate that it should not have toolbars etc.
Speaking as a user, I find castrated popup windows annoying and unproductive.
So my answer is: "don't".