In app.config add the following:
<specFlow>
<unitTestProvider name="MSTest"></unitTestProvider>
</specFlow>
Tips and Tricks
Keep all tips and tricks learned in one place.
Monday, July 3, 2017
Tuesday, November 29, 2016
Fix conflicts for git pull using theirs
Command:
git pull
Output:
error: Pull is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.
Solution:
git reset --mixed -> this unstage all files that are in conflict
git add -> all the files that you have fixed fo the conflict
git commit
git reset --hard
git merge --strategy=recursive -X theirs origin/master
git pull
Output:
error: Pull is not possible because you have unmerged files.
hint: Fix them up in the work tree, and then use 'git add/rm <file>'
hint: as appropriate to mark resolution and make a commit.
fatal: Exiting because of an unresolved conflict.
Solution:
git reset --mixed -> this unstage all files that are in conflict
git add -> all the files that you have fixed fo the conflict
git commit
git reset --hard
git merge --strategy=recursive -X theirs origin/master
Tuesday, November 1, 2016
webdriver-manager not using correct chromedriver after update
PROBLEM:
Command: protractor protractor.conf.js --troubleshoot
I/hosted - Using the selenium server at http://127.0.0.1:4444/wd/hub
I/launcher - Running 1 instances of WebDriver
E/launcher - session not created exception
from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"1294.1","isDefault":true},"id":1,"name":"","origin":"://"}
(Session info: chrome=54.0.2840.71)
(Driver info: chromedriver=2.22.397932 (282ed7cf89cf0053b6542e0d0f039d4123bbb6ad),platform=Linux 4.4.0-45-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 405 milliseconds
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'sorin-K95VB', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-45-generic', java.version: '1.8.0_91'
Driver info: org.openqa.selenium.chrome.ChromeDriver
E/launcher - SessionNotCreatedError: session not created exception
from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"1294.1","isDefault":true},"id":1,"name":"","origin":"://"}
(Session info: chrome=54.0.2840.71)
(Driver info: chromedriver=2.22.397932 (282ed7cf89cf0053b6542e0d0f039d4123bbb6ad),platform=Linux 4.4.0-45-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 405 milliseconds
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'sorin-K95VB', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-45-generic', java.version: '1.8.0_91'
Driver info: org.openqa.selenium.chrome.ChromeDriver
sudo webdriver-manager update --versions.chrome 2.25
2. Start webdriver-manager but old chromedriver is used
webdriver-manager start
I/start - java -jar /usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-2.53.1.jar -Djava.security.egd=file:///dev/./urandom -Dwebdriver.chrome.driver=/usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.22
Command: protractor protractor.conf.js --troubleshoot
I/hosted - Using the selenium server at http://127.0.0.1:4444/wd/hub
I/launcher - Running 1 instances of WebDriver
E/launcher - session not created exception
from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"1294.1","isDefault":true},"id":1,"name":"","origin":"://"}
(Session info: chrome=54.0.2840.71)
(Driver info: chromedriver=2.22.397932 (282ed7cf89cf0053b6542e0d0f039d4123bbb6ad),platform=Linux 4.4.0-45-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 405 milliseconds
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'sorin-K95VB', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-45-generic', java.version: '1.8.0_91'
Driver info: org.openqa.selenium.chrome.ChromeDriver
E/launcher - SessionNotCreatedError: session not created exception
from unknown error: Runtime.executionContextCreated has invalid 'context': {"auxData":{"frameId":"1294.1","isDefault":true},"id":1,"name":"","origin":"://"}
(Session info: chrome=54.0.2840.71)
(Driver info: chromedriver=2.22.397932 (282ed7cf89cf0053b6542e0d0f039d4123bbb6ad),platform=Linux 4.4.0-45-generic x86_64) (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 405 milliseconds
Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03'
System info: host: 'sorin-K95VB', ip: '127.0.1.1', os.name: 'Linux', os.arch: 'amd64', os.version: '4.4.0-45-generic', java.version: '1.8.0_91'
Driver info: org.openqa.selenium.chrome.ChromeDriver
SOLUTION
1. Update chromedriver manually to the latest version in our case 2.25sudo webdriver-manager update --versions.chrome 2.25
2. Start webdriver-manager but old chromedriver is used
webdriver-manager start
I/start - java -jar /usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-2.53.1.jar -Djava.security.egd=file:///dev/./urandom -Dwebdriver.chrome.driver=/usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.22
3. update config.json from /usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/built/config.json and update "chromedriver" to be "2.25"
Sample of /usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/built/config.json
{
"webdriverVersions": {
"selenium": "2.53.1",
"chromedriver": "2.25",
"iedriver": "2.53.1",
"androidsdk": "24.4.1",
"appium": "1.5.3"
},
"cdnUrls": {
"selenium": "https://selenium-release.storage.googleapis.com/",
"chromedriver": "https://chromedriver.storage.googleapis.com/",
"iedriver": "https://selenium-release.storage.googleapis.com/",
"androidsdk": "http://dl.google.com/android/"
}
}
Sample of /usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/built/config.json
{
"webdriverVersions": {
"selenium": "2.53.1",
"chromedriver": "2.25",
"iedriver": "2.53.1",
"androidsdk": "24.4.1",
"appium": "1.5.3"
},
"cdnUrls": {
"selenium": "https://selenium-release.storage.googleapis.com/",
"chromedriver": "https://chromedriver.storage.googleapis.com/",
"iedriver": "https://selenium-release.storage.googleapis.com/",
"androidsdk": "http://dl.google.com/android/"
}
}
4. Start again "webdriver-manager start" and correct version of chromedriver is used
I/start - java -jar /usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/selenium-server-standalone-2.53.1.jar -Djava.security.egd=file:///dev/./urandom -Dwebdriver.chrome.driver=/usr/local/lib/node_modules/protractor/node_modules/webdriver-manager/selenium/chromedriver_2.25
Sunday, August 7, 2016
upgrade virtualbox rtr3initex failed with rc=-1912 (rc=-1912) ubuntu
Upgrade virtual box error: rtr3initex failed with rc=-1912 (rc=-1912) ubuntu
sudo apt-get autoremove 'virtualbox*'
sudo dpkg -i virtualbox-*.deb
Sunday, January 24, 2016
Ubuntu - Run swf files using Firefox
In
/usr/share/mime/packages/freedesktop.org.xml
replace<mime-type type="application/vnd.adobe.flash.movie">
with
<mime-type type="application/x-shockwave-flash">
Then run
sudo update-mime-database /usr/share/mime
Saturday, January 3, 2015
Install Kazam Screen Recorder Tool On Ubuntu
sudo add-apt-repository ppa:kazam-team/stable-series
sudo apt-get update && sudo apt-get install kazam
sudo apt-get update && sudo apt-get install kazam
Tuesday, November 11, 2014
Create desktop shortcuts on Ubuntu
sudo apt-get install gnome-panel
gnome-desktop-item-edit ~/Desktop/ --create-new
gnome-desktop-item-edit ~/Desktop/ --create-new
Saturday, October 18, 2014
Install ChromeDriver and PhantomJS on Ubuntu
http://yizeng.me/2014/04/20/install-chromedriver-and-phantomjs-on-linux-mint/
Install ChromeDriver
- Install unzip
sudo apt-get install unzip
- Download latest version from official website and upzip it (here for instance, to
~/Downloads
)
wget -N http://chromedriver.storage.googleapis.com/2.9/chromedriver_linux64.zip -P ~/Downloads unzip ~/Downloads/chromedriver_linux64.zip -d ~/Downloads
- Make it executable and move to
/usr/local/share
chmod +x ~/Downloads/chromedriver sudo mv -f ~/Downloads/chromedriver /usr/local/share/chromedriver
- Create symbolic links
sudo ln -s /usr/local/share/chromedriver /usr/local/bin/chromedriver sudo ln -s /usr/local/share/chromedriver /usr/bin/chromedriver
Install PhantomJS
- Download latest version from official website and extract it (here for instance, to
~/Downloads
)
wget -N https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2 -P ~/Downloads tar xjf ~/Downloads/phantomjs-1.9.7-linux-x86_64.tar.bz2 -C ~/Downloads
- Move the folder to
/usr/local/share
sudo mv -f ~/Downloads/phantomjs-1.9.7-linux-x86_64 /usr/local/share/phantomjs-1.9.7-linux-x86_64
- Create symbolic links
sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs sudo ln -s /usr/local/share/phantomjs-1.9.7-linux-x86_64/bin/phantomjs /usr/bin/phantomjs
Thursday, October 2, 2014
Install SCID vs PC on Ubuntu
sudo apt-get install auto-apt
sudo auto-apt update-local
sudo auto-apt update
sudo auto-apt updatedb
download and install 'Scid vs PC'
wget http://sourceforge.net/projects/scidvspc/files/latest/download
tar -xzf scid_vs_pc-4.12.tgz
cd scid_vs_pc-4.12
sudo auto-apt run ./configure
sudo auto-apt run make
sudo auto-apt run make install
start the program type 'scid'
sudo auto-apt update-local
sudo auto-apt update
sudo auto-apt updatedb
download and install 'Scid vs PC'
wget http://sourceforge.net/projects/scidvspc/files/latest/download
tar -xzf scid_vs_pc-4.12.tgz
cd scid_vs_pc-4.12
sudo auto-apt run ./configure
sudo auto-apt run make
sudo auto-apt run make install
start the program type 'scid'
Subscribe to:
Posts (Atom)