I have scripts recorded through IDE and added while loop. It is working fine with IDE.
When I try to run through Selenium RC, the browser opens and nothing happen.
I have downloaded user-extensions.js from net and kept where the RC jar is.
Command to run:
java -jar selenium-server.jar -userExtensions user-extensions.js -htmlSuite "*firefox" "https://dev.go.aboutone.com/" "C:\Scripts\test_suite.html" "C:\Scripts\results.html"
I have an answer. It is probably not the official, recommended method ... however, I could never get the recommended method to work and am not a developer. Instead, of course, I hacked it ... and its been working ever since and is easy enough to redo in the event you update your jar file.
I copied an article I found on the internet (cant remember where now) to my own documents, and modified the instructions some. Here is what you can do (not what you should do):
I had trouble using the -userExtensions parameter in my RC batch file for including user-extensions. I also had trouble processing the instructions in the selenium documentation (found here: http://www.seleniumhq.org/docs/08_user_extensions.jsp#using-user-extensions-with-selenium-rc).
Instead of all the developer jargon, I simply cracked open the
selenium-server-standalone-2.25.0.jar file using WinZip, and followed
these instructions-
1. Open the selenium-server-standalone-2.25.0.jar file using winzip an extracted the “user-extensions” file only to your C drive. So now you have the user-extansions.js in your C:\core\scripts folder.
2. Edit the user-extensions.js by adding your extensions, just like you do with the IDE.
3. Using Winzip again, add the modified user-extensions.js to the selenium-server.jar. For this:
a. Open selenium-server.jar using Winzip.
b. Use the “Add” button on the top bar of Winzip
c. In the “Add” window, browse to C:\core\scripts\user-extensions.js file Make sure that the “Actions” choosen is “Add (and replace) Files” and “Save full path info” is checked in the “Folders” option. This will replace the user-extensions.js in the selenium-server.jar with our modified user-extensions.js with same path information.
4. Close Winzip
Now the new selenium-server.jar is ready with your own user-extensions.
No custom processor calls or instantiation needed.
Note, that some IDE user extensions do not work, without modification, with RC. In many cases, the developer usually provided a version for the IDE and a version for RC. If that is the case for the extension you are adding, make sure to copy in the right extension from the
correct source.
Hope this helps.
It is working for me, if I use the full path to the user-extensions.js file:
java -jar selenium-server-standalone-2.53.1.jar -userExtensions "C:\selenium\cardTests\flowControlIDEExtension\user-extensions.js" -htmlSuite "*googlechrome" "http://localhost:12345" "c:\selenium\cardTests\klondikeTestSuite.html" "c:\selenium\cardTests\klondikeTestSuiteChromeOutput.html"
Related
So I´m not very good at using batch-files, but I do need to use this. What I´m doing in the batchfile is following:
1 - Using tf.exe to get latest build from Main and updating the projectfiles.
2 - Compiling every file (.vbp) and then placing the exe / dlls in a folder called "Temp".
START VB6.exe /make "C:\Place1\Place2\development\Main\components\Place3\source\Place4\project11.vbp" /outdir C:\Temp\Place
This all works just fine, the "problem" I'm having with outdir, is that when I'm compiling every file, I do get correct major and minor version, but I want the folder structure, instead of it being "Temp", I´d like it in the batchfile to place it (mkdir) with the same major/minor version that is set in the project file.
So lets say I get latest project files, they are set to 1.0.0 I´d like the /outdir to be set to the same folder as version.
Thanks for reading!
Apologies for the nubbery, but I'm having a real pain getting NUnit to run on my Mac. The overall goal is to have Jenkins on our Mac build server build our Xamarin project and run the relevant tests to the .sln file.
I've got NUnit-Console installed and invoking correctly on the mac. However, whenever I pass it /relative/path/to/solution.sln (or .csproj, we don't have a .nunit or built .dll), NUnit finds the the .sln file correctly, however it then throws this error: Could not find file "/relative/path/to/solution\TestProject.csproj".
The .csproj is there, but NUnit seems to want to append a backslash instead of a forward slash. Is there some config option I've missed for this?
Ok so it doesn't look like you can configure NUnit-Console to not do this. If anyone reads this and is looking for a work around, you just need to get your built files from their location, onto a location that Nunit-console running on windows can access.
For my particular use case with Jenkins as the build manager, I've set the project to build on our MAC server, then as a post build action added 'Archive for Clone Workspace SCM'. I've then setup another project called [ProjectName]Tests, which has the other project targeted in 'Source Code Management' > 'Clone Workspace'.
The test project then has my relevant calls to nunit-console as a Windows batch script and everything works as expected!
Hope this helps save others some time if they hit the same issue!
I hope someone can help me, I was trying to do following tutorial about automatic creation of nuget packages:
http://msdn.microsoft.com/en-us/vs2010trainingcourse_aspnetmvcnuget_topic2
I made following batch file:
#echo off
..\BUILD\NuGet\NuGet.exe pack .\defs.nuspec -OutputDirectory ..\BUILD\myPackages
I can run this file from explorer or shell without problems. When I try to call this batch from the Post_Build event handler of VS2010: (Post-Build event command line)
call "$(ProjectDir)CreateNuGetPackage.bat"
It always return:
Error 47 The command "call "C:\development\mysolution\myproject\CreateNuGetPackage.bat"" exited with code 1.
Even if this path is right.
I even try to make a .cmd file with the same content which also generated the NuGet package without problems but not within the Post-Build dialog. I've also tried to put the content of the bath in the Post-Build event dialog (as defined in the article):
C:\development\mysolution\myproject\..\BUILD\NuGet\NuGet.exe pack C:\development\mysolution\myproject\defs.nuspec -OutputDirectory C:\development\mysolution\myproject\..\BUILD\myPackages
And I'm still getting the same error... I really have no clue what can be going wrong, I hope someone can help me or give me an alternative way of generating such packages.
Thanks!!
I finally ended up solving the problem: I had to copy an instance of Nuget to the folder where my solution lies. Even if Nuget was in the path. I still don't know why VS was not able to find nuget if started from a post-build event (I'm not using nuget anymore, it doesn't fit my needs as I was expecting something similar to maven).
When I'm trying to build my VC++ code using 2010 I'm getting the error message
> C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(151,5): error MSB6006: "cmd.exe" exited with code 1.
Please tell how to overcome this?
Navigate from Error List Tab to the Visual Studios Output folder by one of the following:
Select tab Output in standard VS view at the bottom
Click in Menubar View > Output or Ctrl+Alt+O
where Show output from <build> should be selected.
You can find out more by analyzing the output logs.
In my case it was an error in the Cmake step, see below. It could be in any build step, as described in the other answers.
> -- Build Type is debug
> CMake Error in CMakeLists.txt:
> A logical block opening on the line
> <path_to_file:line_number>
> is not closed.
error MSB6006: "cmd.exe" exited with code -Solved
I also face this problem . In my case it is due to output exe already running .I solved my problem simply close the application instance before building.
I had the same problem today, while I was upgrading some VC6 project to VC2012.
In my case, it was because some of the operation in Custom Built Steps failed.
In project properties, go to Custom Build Step, you can see there maybe some something in command line edit box. Open a windows prompt and paste the command to it. Run, check if there is something wrong and fix it.
If there is no command line in the project property Custom Built Step, maybe you should check properties of every single file of the project.
If the command line has some macro, replace it with an actual value.
Or you can echo the command in VS output window:
cd %(somedir)%
echo %(somedir)%
You won't miss it this way.
I solved this. double click this error leads to behavior.
open .vcxproj file of your project
search for tag
check carefully what's going inside this tag, the path is right? difference between debug and release, and fix it
clean and rebuild
for my case. a miss match of debug and release mod kills my afternoon.
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">copy ..\vc2005\%(Filename)%(Extension) ..\..\cvd\
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">copy ..\vc2005\%(Filename)%(Extension) ..\..\cvd\
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">..\..\cvd\%(Filename)%(Extension);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">..\..\cvd\%(Filename)%(Extension);%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">copy ..\vc2005\%(Filename)%(Extension) ..\..\cvd\
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">copy %(Filename)%(Extension) ..\..\cvd\
</Command>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">..\..\cvd\%(Filename)%(Extension);%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">..\..\cvd\%(Filename)%(Extension);%(Outputs)</Outputs>
</CustomBuild>
Actually Just delete the build ( clean it ) , then restart the compiler , build it again problem solved .
I also faced similar issue.
My source path had one directory with 'space' (D:/source 2012). I resolved this by removing the space (D:/source2012).
For the sake of future readers. My problem was that I was specifying an incompatible openssl library to build my program through CMAKE. Projects were generated but build started failing with this error without any other useful information or error. Verbose cmake/compilation logs didn't help either.
My take away lesson is that cross check the incompatibilities in case your program has dependencies on the any other third party library.
Simple and better solution :
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe MyProject.sln
I make a bat file like this
%WINDIR%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe D:\GESTION-SOMECOPA\GestionCommercial\GestionCommercial.sln
pause
Then I can see all errors and correct them. Because when you change the folder name (without spaces as seen above) you will have another problems. Visual Studio 2015 works fine after this.
When working with a version control system where all files are read only until checked out (like Perforce), the problem may be that you accidentally submitted into this version control system one of the VS files (like filters, for example) and the file thus cannot be overridden during build.
Just go to your working directory and check that none of VS solution related files and none of temporary created files (like all moc_ and ui_ prefixed files in QT, for example) is read only.
I was in a similar situation to the one described by "irsis".
I configured the project through CMAKE, and in CmakeList, I linked the OpenCV library to the project. However, when I updated the OpenCV version for another project, the path was changed and error occurred.
Check path of all related library.
Another solution could be, that you deleted a file from your Project by just removing it in your file system, instead of removing it within your project.
We're implementing Team Build and know we need to write MSBuild scripts to build our legacy VB 6 app. It's configured to use Binary Compatibility and we break Compatibility occassionally and we'd like our new automated build process to be able to Break Compatibility automatically.
Anyone know how to do this or if it's even possible?
Alternatively, I know that the break just changes the compatibility to No Compatibility, compiles, changes to Binary and recompiles. If anyone knows how to just change Compatibility from the command line this would also be helpful.
Regarding changing from Compatibility to No Compatibility, I've done things like this by editing the project file with Unix-style tools (sed, awk, and/or perl). Do not change the original project file, but instead generate a new/temporary project file, and build with that. Here's an example:
sed -e "s/CompatibleMode=0/CompatibleMode=2" <myProj.vbp >tmpProj.vbp
You can use this technique for other purposes, such as inserting a version number into the project file.
The /d switch allows you to replace project property values at compile time. Try
VB6 /MAKE c:\Some.vbp /outdir c:\somedir\ /d CompatibleMode="0"
This works:
VB6 /MAKE c:\Some.vbp /outdir c:\somedir\ /d CompatibleMode="0" CompatibleEXE32=""
I am not sure any of the solutions above work. we had same issues in our product. we had to write a vb project that (also functioned as an addin) to break compatibility and build the project. the vb project, reads the existing VB file, generates a new vbp file with project compatibility settings and new destination for the generated dll. the destination would be the same folder where the ref-dll resides. once the dll is built, the old dll's is removed and new red-dll one is renamed to match the old one. at the end of it, all temp files will be removed. the vb project has an exposed function that takes one parameter which is the vbp file. this could be run from a vb script. so essentially the command line argument would be
BuildRefDll.vbs <my.vbp>
vb6.exe /make <my.vbp>