File Path is not absolute-selenium -AWS instance - selenium

Functionality-Uploading a file.
When I run my code to upload a file in AWS instance, absolute path of the file which I get is like /home/ec2-user/project/src/.../filename. If the script tries to upload the file to the application under test with above path I get file path is not absolute error. Any suggestion on this.
Thanks in advance.

Related

Jenkins Error: fatal error C1083: Cannot open include file: 'xyz.h': No such file or directory

Can any one please tell me how to resolve this kind of error?
This header file placed in different folder and project.sln file present in some other folder. but both folders are present at same master folder like :
Project_Data(main folder)
1. Source_code (project.sln present here)
2. Supported_Files(xyz.h file present here)
and in jenkins i give the svn location of master folder.
Firstly thank you for your response to my question. Now i got the solution of above error.
In this case we can change the location of missing file(i.e which is not found by jenkins while exection) to folder where .sln file placed.We can do this process manually or we can write execution script to automate this process.
Thanks :)

Bamboo with Selenium - Read file on local file system

I am trying to open .html file from local file system. When I run build on bamboo it fails to open file.
error message
file not found
Path on local system
file:///Users/xx/testing/framework/data/email/file_name.html
Path on Bamboo
file:///Users/xx/testing/framework/data/email/file_name.html
Any ideas how I can fix this. Please let me know if you need any info.
Thanks

I cannot install PhpWord Yii

I have tried to install PhpWord to yii. I have downloaded zip file and extracted it into extentions folder:
extenstions
--PHPWord
--PHPWord.php
However, I cannot make it to run. I got following error:
include(PHPWord.php): failed to open stream: No such file or directory
How can i solve it?
After extracting the file in extension folder, you have to import that file in controller.
Yii::import('ext.phpword.PHPWord');
First of all, you didn't say if it's Yii 1 or 2. They have different autoloading methods.
Second, you have extracted it into extension folder, and I assume your file where you want to include it is in a completely different folder.
You should do it like this
include('/full/path/to/PHPWord.php');
You need either absolute or a relative path to the file (I suggest using abosulte path (the one I used as an example).
Relative path means the path to the file you want to include compared to where your file, in which you are including it, is.

Tell computer to use my dll files

I need to write a batch file which gets the path for a folder(e.g. lib) located in the current directory of the batch file and tell my computer to use my dll files located in there.
Anybody knows how to do this?
Thanks,
I have resolved the problem by changing the approach. Now I add my library into a given folder and then add its path to PATH environment variables by a batch file. Then run my exe file.

File upload in specific folder of web application in liferay..?

I am using liferay 6.0.5. I am uploading file using following code.
UploadPortletRequest uploadRequest = PortalUtil.getUploadPortletRequest(actionRequest);
String submissionFileName = uploadRequest.getFileName("file");//uploaded filename
File submissionFile = uploadRequest.getFile("file");
this works fine and upload file in tomcat's temp directory with some different name. What I want is.."There is one folder docs in my project directory. I want uploaded file in this directory". How to do this in liferay..?
If you want to change the temp directory for the file upload then you can change the following property in portal-ext.properties:
com.liferay.portal.upload.UploadServletRequestImpl.temp.dir=C:/MyTempDir
Hope this is what you are looking for.
If you want to add files to Liferay's Document Library then check out the following classes:
http://docs.liferay.com/portal/6.0/javadocs/com/liferay/portlet/documentlibrary/service/DLFileEntryLocalServiceUtil.html
http://docs.liferay.com/portal/6.0/javadocs/com/liferay/portlet/documentlibrary/service/DLFolderLocalServiceUtil.html