trigger io chrome extension does not seem to work - google-chrome-extension

I am trying trigger io for the first time.
I am trying to use the chrome extension and eventually would like to get to a point where I can run/debug (using chrome developer tools) on the browser before deploying to IOS and android.
I created the default app you have - I am able to run it on IOS simulator.
When I run it on chrome, I get the following:
The required steps are:
1) Go to chrome:extensions in the Chrome browser
2) Make sure "developer mode" is on (top right corner)')
3) Use "Load unpacked extension" and select the folder:
I have followed the instructions given but even if I quit the browser and relaunch it and run the forge build for the default app, I get the same response.
Would appreciate any help.

Does the extension install when you run through the steps you list in your question?
Note, to see your app running in Chrome, you'll need to use something like the button module...
However, if you just want to see your app running in a browser so you can use developer tools, click "web" instead of "chrome" - it will open as a web app in your browser.

Related

How to change the content and size of the app window that installs the extension

I created a Safari Web Extension using the script that generates the project from a Chrome extension.
My users are confused by the process of buying the app and then running it which just opens a window that does nothing (they keep asking for refunds saying the app doesn't work). So I want to add some more text into the app window that tells them they have to look for the extension in Safari.
I can see how to add the text in the html file called "Main". But in my Mac app this means that the content no longer fits within the apps window. I'm trying to figure out how to change the size of the app window.
Also, the script generates a Mac app with a help menu but it just says that help is not available. How do I go about adding some help to explain that this App does nothing and that the extension is in Safari?
It seems like the script does a lot of the work for you but you still have to learn a bit about developing an App (rather than an extension) to make it a polished experience.

Disable automation warning in Safari when using selenium

I Would like to perform tests in safari, using selenium.
Unfortunately, when I try to debug issues using the safari, a notification appears which requires me either disable automation in safari or to quit (attached image).
why I cannot do it as in Chrome & FireFox (for ex: press F12 to see the DOM) ?
Note: I'm using MacOs Catalina with Javascript & Python for selenium
This error message...
...implies that the Safari browser's WebDriver support for developers and automation developers is turned off by default.
Configure Safari to Enable WebDriver Support
As per the documentation in Testing with WebDriver in Safari Safari's WebDriver support for developers is turned off by default. Enabling the WebDriver support depends on your operating system.
In High Sierra and later:
You need to enable safaridriver once.
/usr/bin/safaridriver --enable
If you’re upgrading from a previous macOS release, you may need to use sudo as follows:
sudo /usr/bin/safaridriver --enable
Sierra and earlier:
To make the Develop menu available. Choose Safari > Preferences and on the Advanced tab, select Show Develop menu in menu bar.
Choose Develop > Allow Remote Automation.
Authorize safaridriver to launch the XPC service that hosts the local web server. To permit this, manually run /usr/bin/safaridriver once and follow the authentication prompt.
Unfortunately we don't seem to be able to pause the tests, interact with the browser and then resume the tests afterwards with safaridriver, as we can with geckodriver and chrome webdriver.
The closest option you have is to 'Stop Session' in the pop-up from your screenshot.
From what I can see the 3 options listed are:
Turn off all automation - Stops the test and turns off all the automation settings. This will require you to allow remote automation/enable safaridriver again.
Stop session - this stops the test but leaves the browser open so that you can manually interact with it and use the Web Inspector tools.
Continue session - this closes the pop-up and continues with the test.
So, to summarize for all other (frustrated) developers who come across #Safari and try to automate it.. it is impossible to write automation because of this limitation.
So the options are:
Write in other browser (such as chrome) and verify it works in safari
Manually in other session in safari(manual) locate your locators/paths and then insert to you automation-infra
and to add to complexity - Selenium clicks doesnt work in many places where on chrome/ff/edge DO work.
so, possible solution to that - is to use JS in DOM - but that is also not perfect.
hopefully the situation will improve
This should solve your problem.
warnFromSafari = driver.SwitchTo().Alert();
warnFromSafari.Accept();

How To Hide Chrome Web Driver Icon (Python-Selenium)

UPDATED WITH REASONING
Goal: Run chrome web driver in background without showing an app icon in the dock or application bar. FYI: I can already run chrome headless, but I have not been able to hide or not show the chrome icon in my app bar.
Reason: I am building an application that accesses various websites in parallel and I would not like the chrome app icons to display for the synchronous tasks that are taking place. I want to run these tasks in the background.
Current Code with chrome options that will display headless chrome
chrome_options = Options()
chrome_options.add_argument('headless')
chrome_options.add_argument('window-size=1200x600')
driver = webdriver.Chrome(executable_path=executable_text, chrome_options=chrome_options)
Research
list of chrome options: https://peter.sh/experiments/chromium-command-line-switches/
one of many posts explaining how to do headless chrome: Selenium - chrome Driver fail to start in background (without a start-up window)
How can I hide the chromedriver app icons from displaying? Is there a chrome option I can set in addition to setting the 'headless' chrome option? Is this more of an OS setting that needs to be made to run chromedriver in the background? I am successfully able to run multiple chromedrivers in headless mode but it would be nice to NOT show the chrome icons in the dock or application tray similar to how phantomjs does not launch an app icon.
^In the image above those are the chromedrivers that run in headless mode displaying in my dock and ideally for my program I would not even want to display those icons since it is all background processing anyways.
Update (this worked for me to hide the chromedriver icons at least on my Mac):
I was not able to find a Chrome Option to accomplish hiding the chromedriver icons that appear in the dock. However, I was able to edit the Info.plist file for Chrome as part of my program to do the trick (of hiding chromedriver icons) using the LSBackgroundOnly key.
In the Info.plist for Chrome, programmatically, I entered:
<key>LSBackgroundOnly</key>
<string>1</string>
On my Mac using python3 code I used os.system to execute a terminal command using defaults to enter the LSBackgroundOnly key when the program is executing and then at the end of program execution I delete the LSBackgroundOnly key from the Info.plist.
like this:
1)
defaults write /Applications/Google\ Chrome.app/Contents/Info.plist LSBackgroundOnly -string '1'
2)
defaults delete /Applications/Google\ Chrome.app/Contents/Info.plist LSBackgroundOnly
AS INFO: This is tricky because your normal chrome app may start up in background mode if you don't add/delete LSBackgroundOnly properly during program execution. In my experience, worst case scenario you may have to manually remove LSBackgroundOnly from the Info.plist file then restart your computer to get Chrome out of background mode.
I remove the LSBackgroundOnly key from the Info.plist file in my program after program execution because the key only needs to be in the file when the chromedrivers are launched. After that I want to be able to use regular Chrome app without issues of it opening in background mode. But, if you understand your program execution and handle your exceptions, this will definitely work to hide the icons correctly and there will be nothing different in using your regular Chrome app.
Happy hacking.
This is not possible using Selenium. I don't really understand why you want to do this. Is there a real purpose, or it's just you don't want it to show? Even if the Chrome app shows on the dock, in headless mode, it works pretty good.
However, if you want your icon to not appear in the dock when opened, then you need to disable it by modifying the Info.plist file for that application.
In your Info.plist for Chrome, add this
<key>LSUIElement</key>
<true/>
This will prevent your app icon from appearing in dock, when working. I found this out a long time ago and this is the post where I saw it.
PS - I have not tested it for Chrome app. Please test at your own peril.

Pepper Robot Web Debugging

We're trying to show a web page on pepper's tablet, but something goes wrong. How can we get the browser's error messages to debug the web page?
We know js 1.5 is implemented, so we installed all kind of polyfills for Promises, forEach, etc. But no luck. How can we get meaningful debugging info?
thx
Sven
I create a git for showing a web page and send event with the module ALMemory ( see it for an example). For debugging, it is more complicated but you can also try this. You can create a template for showing web page and connect directly it to your robot. For example, you install it on your pc and create a web-page template with python jumpstart.py service-tabletpage my-package-name MyServiceName. A package will be create in a file output. Open this app on choregraphe and install it on the robot. You can after that launch on your computer the web page (double click on index.html, name by default) and just adding at the end of the url ?robot=ip_of_the_robot. You can now debug your code.

Speeding up the Chrome App Development Process

Currently, my development process is:
1. zipping my code
2. uploading it at https://chrome.google.com/webstore/developer/dashboard, clicking publish
3. repeatedly clicking on "update extenstions now" at chrome://extensions/ to update the app which can take up to 60 minutes.
Is there a better way to do this? Waiting upto 60 minutes make dev very slow.
The official documentation shows how to use developer mode to quickly load and launch your app/extension without having to finalize a distribution package:
Open chrome://extensions from the Chrome omnibox or via Settings
and enable [x] Developer mode check box.
Drag'n'drop your app/extension folder onto the chrome://extensions page
or click Load unpacked extension and choose your app/extension folder
Click Launch or use Chrome App Launcher

Resources