Protractor Running exe with child_process - protractor

i'm trying to simulate an upload file with protractor
i know that the protractor can't interact with OS window
and i created an EXE file (with autoit), that takes focus and insert a file .
when i'm testing manually everything working ok .
when i try to write it in protractor i get error
this is my protractor code ( using child_process ) -- see pic
Here is my error massage
tried using : NO LUCK!!

You don't need AutoIT to upload files. Just send full absolute path to file that you want to upload into upload input. If you are running tests with Selenium Grid you also need to use FileDetector to send file to node where test is running:
var FileDetector = require('selenium-webdriver/remote/index.js').FileDetector;
browser.setFileDetector(new FileDetector());
var path = require('path');
var fileToUpload = '../yourfile.txt',
absolutePath = path.resolve(__dirname, fileToUpload);
$('hiddenfileuploadinput').sendKeys(absolutePath)
Here is question that has answers that might help:
How to upload file in angularjs e2e protractor testing

I have faced the same error while working on mine. I had to open a .exe file using protractor. Putting the right path to .exe worked for me. Can you also re-check if it's the right path

Related

flutter desktop run executable file that locate in assest,

how do I run the executable files from Flutter desktop that also store in that app itself, let say if I made a batch file that echo hello worlds. the idea is I don't want the executable file in the app itself. the only thing that I can think of is assets. I want to run the file with Process. start or run. I tried the "workingDirectory" to assets dir but it doesn't work. Any other solution or maybe I do it the wrong way.
Process.run('C:/Users/<Ur User>/AndroidStudioProjects/web_view_test/build/windows/runner/Debug/installerX64/install.exe', [' start ']).then((ProcessResult results) {
print(results.stdout);
});

How to run files as a project in VS Code?

I'm trying to learn Vue.js as well so I create a simple folder called VueTest.
I have two files in the folder:
app.js
index.html
I found the info on how to configure the task runner to open up the current file and I have that setup to open in Chrome, which it does. However, because it's not running as a project, my index.html doesn't see the app.js file and so my Vue project is not working correctly. I just runs the HTML code an all I see is my mustache code (ex: {{Title}}).
How do I run files as a project?
If get it correct - you want to launch js app without opening teminals outside 'VS Code' then you have to see this
Have fun
I found my mistake, it's actually easy and I should have figured this out before posting.
To run Index.html on it's own, all I had to do was make a script reference in the page pointing to the app.js file. I didn't have to do that in JsFiddle.
you can't run files as a project in VS Code. it is just a text editor.

Cannot load assets in html project

I am trying to test a html build. The thing was working right until I tried loading an image file from the asset folder.
In the asset folder I have two files: badlogic.jpg and test.png
They are both loaded the same way:
varname = new Texture(Gdx.files.internal("<filename>"));
The project is build with:
./gradlew html:superDev
Loading the badlogic.jpg file works just fine, but loading any other file in the same folder does not work and gives the following error:
GwtApplication: exception: Couldn't load image 'test.png', file does not exist
Couldn't load image 'test.png', file does not exist.
I am loading badlogic.jpg first. I have confirmed that both files are in the same folder.
This is not a problem on android and desktop.
Well, just as I posted the question I found the answer.
My first thought was that I needed to clear my browser cache. I cleared it multiple times but it didn't work.
But.... I was testing the project in one window and using another to do other things. The browser window I used to clear the cache was firefox, the window I used to test the project was chrome... So... that's why it didn't work.
It works now that I have cleared the cache in the browser I use to test the project.
I think its time for bed.

Download and use file with Protractor e2e test

How do I write a test that download a file, and post it in a form.
it "should support download and upload a file", ->
upload = element(By.id 'UploadInput');
upload.sendKeys 'C:\\path\\to\\file\\file.txt'
Currently the upload works, but how do I download a file before and get it's path?
Solved it by adding the file to project and got the absolute path like this:
it "should support download and upload a file", ->
upload = element(By.id 'UploadInput');
upload.sendKeys path.resolve(__dirname, '../../assets/file.txt')

Hadoop eclipse plugin : Unable to see output on console

I am using hadoop-0.20.2 from http://www.apache.org/dyn/closer.cgi/hadoop/common/ and I'm using the following Eclipse plugin hadoop-0.20.1-eclipse-plugin.jar from http://code.google.com/p/hadoop-eclipse-plugin/.
Using the file I'm able to load the file into HDFS and also able to compile word-count program . I'm able to compile it without error and get .class files. But when I run the project on Hadoop, I don't see any out-put on the console.
Please tell me if there are any configurations that I need to get the out-put on console. Even output file is not generated.
You should chack the out file path given in FileOutputFormat.setOutputPath(conf, new Path(args[1]));
Note that the output directory should not exist.
I am running the same example given here. And it works fine and also creating the output folder.