Dart Editor Unable to run current selection - please select a runnable resource - dart

Last year I thought I would give Dart a try, so I downloaded the Dart + Editor zip from the dartlang.org website and got it working on my Ubuntu 12.04 environment. When trying to get the Sunflower demo to run (by clicking the Run button), I got the "Unable to run current selection - please select a runnable resource" error. After exploring Google for answers, I found nothing, so I gave up on Dart at the time, not wanting to spend the time on something that is still buggy. Since then I prepared a completely new Ubuntu 14.04 environment on a new computer and thought I would give Dart another try. So I downloaded and installed it again this year and I am experiencing the exact same problem, still with no answers from Google searches. If this were a bug, I figured something like this would have been resolved after a year, or at least some discussion somewhere on Google about it. Am I doing something consistently wrong?
I extracted the dart zip into /opt/dart
I installed openjdk-7-jre
I executed DartEditor and it runs
I select the Sunflower demo
I click the green Run button
I get the following error: "Unable to run current selection - please select a runnable resource"
Any ideas?

Try the context menu on the entry page file (index.html or sunflower.html) in the web sub-directory and choose Run in Dartium
There is no unique or default entry point in a Dart package and no way to configure one.
You always have to run a specific Dart script file or HTML page that contains a ` tag.
I almost never used the run Button in the toolbar.
When you have for example the menu Run/Always run last launch activated and run an entry point like described above the toolbar run button should work to run the same entry point again.
I guess there are other ways to make this run button work but as I said, I almost never use this one myself.
Context menu Run in Dartium, Run as Javascript for web applications and context menu Run for command line scripts worked always for me.

Related

"Cached element do not exists in DOM" when run Appium with Robot Framework

I'm working on automated test using Appium with Robot framework on Android device. I create schedule run on Jenkins. My test flow is entering some data in page A and submit, then switch to page B to check the result and switch to page A to enter a new data. I repeat this loop for around 10+ time. Everything works fine in around 4-5 rounds but after that there show up an error :
StaleElementReferenceException: Message: Cached element 'By.xpath:
//android.widget.TextView[#text='Limit']' do not exists in DOM anymore
The TextView is in the page A. I monitored the robot and saw that the TextView was shown up but the robot did not see it. I tried restart the device but the problem is not solved. I search through the internet and found some who facing the same issue but they use different programming language like Java or Python. I have no idea what I have to do next.
Development Tools :
Appium version: 1.21.0
Robot Framework version: 4.1.2 (Python 3.10.0 on win32)
First I do not use Robot Framework, but the code should be similar according to this https://robocorp.com/docs/languages-and-frameworks/robot-framework/try-except-finally-exception-catching-and-handling.
Second, I'm not sure if this is the best way to get around this. I think there is something you can do with the expected conditions class to get around this in a "cleaner way" but I'm not quite familiar with it enough to show/tell you. Instead what I've done is something like this...
from selenium.common.exceptions import StaleElementReferenceException
while some_limiting_factor:
try:
# logic for submitting page A, assertions for page B
except StaleElementReferenceException:
element = driver.find_element('By.xpath: //android.widget.TextView[#text='Limit']' )
As much as I want to cache elements in appium, it seems that the service itself does NOT want you to, at least not in my experience. Getting a fresh element(s) every time seems to ensure a "slow but steady" test. Hopefully someone can show me the deep appium secrets one day.

Rstudio Server Highchart Opens New Tab

I have an unusual issue (can't find anything on SO or Google).
I have installed Rstudio on the amazon cloud. When I try to run any code to produce a highchart the instance opens a blank tab.
Here is the simple code I am using...
library(highcharter)
md <- (1:10)
hchart(md)
The first two lines run fine, but when I run the third line a new tab opens with the URL...
http://my.cloud.url:8787/file_show?path=%2Ftmp%2FRtmpUwu8Vb%2Fviewhtml777930f3f5e2%2Findex.html
Has anyone seen this issue before / know what is happening or how to resolve?
Thanks
Mike

Call Windows Context Menu Entry Directly

I need to run a selfmade context menu entry via cmd.
The command is stored in
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\testCommand\command"
and contains
C:\Path\convert.exe %1 test1|test2
The problem is that windows seems to call the program associated with the command differently the first time. I don't know why and I can't get figured out how to avoid this.
So I want to call the program myself the first time before the user can call it.
If I execute the program myself directly via cmd it runs correctly, but if Windows executes it using the context menu entry it behaves different. After the first time it runs as supposed.
It couldn't find anything simmilar using google and stackoverflow ..
Whats the matter here? Also tried to run it using
RunDll32.EXE URL.DLL,FileProtocolHandler "C:\path\convert.exe"
But couldn't add the parameters requiered ..
Please help me ..

using NSIS to install and run every time

Im doing a little research into installers, and right now at my company we are having some issues deploying from jenkins using click once. We have a test certificate(these programs are all internal) and for some reason are having some issues with the certifcate being incompatiable with certain msbuilds/.net frameworks. So im looking into alternatives.
But in that i want to keep the same architecture. How it works right now is someone clicks on a button in our task bar, clicks on the application they want, and then click once installs the updates(or installs) without further user input and starts the application. Ive heard a lot of good things about NSIS.
So far ive only seen generic application installers like you expect when you download anything from the internet. Could I do something like i described above using NSIS?
A very basic no interaction installer might look like this:
Name foo
OutFile foo_setup.exe
AutoCloseWindow true
RequestExecutionLevel user
InstallDir "$LocalAppData\Programs\MyApp"
Page InstFiles
Section
SetOutPath "$InstDir"
WriteUninstaller "$InstDir\uninst.exe"
; TODO: Add registry entry for Add/Remove Programs
File "MyApp.exe"
File "Data.xml" ; Support files etc
Exec '"$InstDir\MyApp.exe" -firstrun "c:\some path\file.ext"'
SectionEnd
Section Uninstall
Delete "$InstDir\MyApp.exe"
Delete "$InstDir\Data.xml"
Delete "$InstDir\uninst.exe"
RMDir "$InstDir"
SectionEnd
If you want to install for all users in %ProgramFiles% you can run into issues with Exec because the app can end up running as the wrong user if a non-administrator used some other account in the UAC dialog.

Command Prompt input

I have a Windows 7 laptop, and I think I installed everything correctly, and I am trying to follow a couple tutorials to learn from. I can make a new application ok, and I can start the server just fine by typing "rails server", and I can go to the localhost:3000 'welcome aboard' page just fine, but after that the tutorials ask me to type other stuff into the command prompt window. The problem is, with the server running, I can't type anything into the command prompt window! I'm obviously doing something wrong.. anyone have any idea of what I should be doing?
The easiest way is to open another command window.
I set up students to use more than one command window like this:
one for typing most commands
one for running the server
one for printing the log file using the "tail -f" command to show ongoing progress
one for running rails console

Resources