Running webdriver tests in Opera - webdriver

I'm trying to run the tests on opera using webdriver 2.3. Although the browser opens the tests are not getting executed.
Browser just opens the profile dir as shown in the screenshot.
Am I missing anything?

Use the following process:
Find a testrunner based on your language, such as:
grunt-webdriver
gulp-webdriver
watir-webdriver
php-webdriver-for-phpunit
webdriver-for-Robot
webdriver-for-nunit
webdriver-for-mstest
selenium-cucumber-js
serenity-bdd
Add the path the to test file(s) to the testrunner
Pick the OperaPrestoDriver or OperaChromiumDriver
Add the path the the OperaDriver to the testrunner
Start the Selenium server
Start the testrunner

Related

CEF / CEFSharp Compiling Issue

Environment: Windows 10, WinForm (.Net 4.7.2) x64 only, CefSharp 71.0.2.0
We need support for playing MP4 in our product (we have a license) and we are attempting to recompile CEF with proprietary codecs enabled.
We're using the instructions from:
https://bitbucket.org/chromiumembedded/cef/wiki/MasterBuildQuickStart.md#markdown-header-windows-setup
Our create.bat file looks like:
set CEF_USE_GN=1
set GN_DEFINES=is_win_fastlink=true proprietary_codecs=true ffmpeg_branding=Chrome
set GN_ARGUMENTS=--ide=vs2015 --sln=cef --filters=//cef/*
call cef_create_projects.bat
Our update.bat file looks like
set CEF_USE_GN=1
set GN_DEFINES=is_official_build=true proprietary_codecs=true ffmpeg_branding=Chrome
set GN_ARGUMENTS=--ide=vs2015 --sln=cef --filters=//cef/*
python ..\automate\automate-git.py --download-dir=C:\code\chromium_git --depot-tools-dir=C:\code\depot_tools --no-distrib --no-build --branch=3578
We are trying to specifically target build 3578 to match the build that comes with CEFSharp. We also enabled proprietary codec using the flag: proprietary_codecs=true
After about 2 hours and no errors the build completes successfully. When we run our page using cefclient.exe from the output build everything works as expected, the video plays correctly.
We copy the following files from the output build folder to our .Net application replacing the files packaged with CEFSharp:
cef.pak
cef_100_percent.pak
cef_200_percent.pak
cef_extensions.pak
chrome_elf.dll
d3dcompiler_47.dll
devtools_resources.pak
icudtl.dat
libcef.dll
libEGL.dll
libGLESv2.dll
natives_blob.bin
snapshot_blob.bin
v8_context_snapshot.bin
\locales\*.*
\swiftshader\libEGL.dll
\swiftshader\libGLESv2.dll
When running our app, the app terminates immediately and this is written to the debug.log file:
[0326/094610.429:FATAL:cookie_manager_impl.cc(620)] Check failed: false. context not valid
Backtrace:
cef_string_utf16_to_upper [0x00007FFD2B53E1E5+1713061]
cef_string_utf16_to_upper [0x00007FFD2B53D44D+1709581]
cef_string_utf16_to_upper [0x00007FFD2B5765D5+1943445]
cef_zip_reader_create [0x00007FFD2B3107B8+159661640]
cef_cookie_manager_get_global_manager [0x00007FFD219B0436+54]
CefCookieManager::GetGlobalManager [0x00007FFD7322879E+94]
(No symbol) [0x00007FFD4E1C07DE]
[0326/094721.035:FATAL:cookie_manager_impl.cc(620)] Check failed: false. context not valid
I was able to see that 71.0.2.0 uses CEF 3.3578.1870.gc974488 / Chromium 71.0.3578.98 from:
https://github.com/cefsharp/CefSharp/commit/7d24861e7af79fc4721eb498bb8417b5aa6cad97
When we run cefclient.exe from our build and navigate to chrome://about it displays:
CEF 3.3578.1870.gc974488
Chromium 71.0.3578.98
Which matches the CEFSharp release notes page.
Any suggestions would be greatly appreciated!

How to package Qt5 application with snapcraft

I'm trying to create snap package of a Qt/QML application, the application is packaged well, when I try to run it I get /snap/swipe-app/x2/bin/qt5-launch: 74: exec: application: not found error.
here's my snapcraft.yaml file
name: swipe-app # you probably want to 'snapcraft register <name>'
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: Single-line elevator pitch for your amazing snap # 79 char long summary
description: description
grade: devel # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots
apps:
swipe-app:
command: qt5-launch application
plugs:
- unity7
- home
parts:
application:
# See 'snapcraft plugins'
plugin: qmake
project-files: ["snap.pro"]
source: .
build-packages:
- qtbase5-dev
stage-packages:
# Here for the plugins-- they're not linked in automatically.
- libqt5gui5
after: [qt5conf] # A wiki part
As you have told the launch script that your program is called application then it will try to execute application from the current working directory when you run your snap. There are two things to note here:
The working directory is preserved from the terminal outside the snap context. For example if you are in your home directory /home/your-user then the working directory for swipe-app will also be /home/your-user.
As the working directory above is your home directory then commands without any anchor, such as application, will try to execute in your home directory. So in your example the launch script will attempt to run the command equivalent of /home/your-user/application.
You can fix this by either ensuring that the launch script executes a cd to change the working directory, e.g. cd $SNAP; or anchor your command by adding an achor, e.g. command: qt5-launch $SNAP/application.
Another thing you might need to check is that your qmake build actually outputs a binary called application. If you have not set TARGET= in your snap.pro project file then the binary will default to being called snap, not application. The line should read TARGET=application to make a binary called application: (ref: https://doc.qt.io/qt-5/qmake-variable-reference.html#target).

When i used webdriver sampler in jmeter for this code,i got blank window

When i used webdriver sampler in jmeter for this code,i got blank window,Please give me the solution
var pkg = JavaImporter(org.openqa.selenium)
var support_ui = JavaImporter(org.openqa.selenium.support.ui.WebDriverWait)
var wait = new support_ui.WebDriverWait(WDS.browser, 5000)
WDS.sampleResult.sampleStart()
WDS.browser.get('http://duckduckgo.com')
var searchField = WDS.browser.findElement(pkg.By.id('search_form_input_homepage'))
searchField.click()
searchField.sendKeys(['blazemeter'])
var button = WDS.browser.findElement(pkg.By.id('search_button_homepage'))
button.click()
var link = WDS.browser.findElement(pkg.By.ByCssSelector('#r1-0 > div.links_main > h2 > a.large > b'))
link.click()
WDS.log.info(WDS.name + ' has logged an entry');
WDS.sampleResult.sampleEnd()
If you experience any problems with JMeter the first place to look for the cause is jmeter.log file which usually lives under /bin folder of your JMeter installation.
The most frequent problem is Firefox and Selenium libraries mismatch as Firefox is being updated more frequently and Selenium support is few versions behind.
In order to determine supported version:
Determine underlying Selenium version by looking for "selenium-*" files under /lib folder of your JMeter installation. For instance latest WebDriver plugins come with Selenium 2.46.0
Look into Selenium Java changelog and see supported Firefox version.
Download supported Firefox version from Mozilla FTP website and install it somewhere.
Edit system.properties file (lives under /bin folder of your JMeter installation) and add the following line there:
webdriver.firefox.bin=/path/to/firefox/executable
Restart JMeter - everything should be working fine.
See The WebDriver Sampler: Your Top 10 Questions Answered guide for more WebDriver Sampler tips and tricks

unable to launch custom brackets.exe

I have created a desktop app using brackets-shell version sprint-38. I have done the following changes.
config.h -changed APP_NAME from 'Brackets' to 'MyBrackets'.
appshell_config.gypi - changed appname from 'Brackets' to 'MyBrackets'.
Gruntfile - changed build.name from 'Brackets' to 'MyBrackets'.
After building brackets-shell with these changes i used to get 'MyBrackets.exe'
inside brackets-shell/release folder.
while executing the exe one file chooser popup comes, and node & MyBrackets.exe processes will start in the background.
his works fine with Sprint38,But after migrating to brackets-shell tag version release-1.3 or master, this dose not work. The file chooser is not coming as well as no node process starts.
Is any thing i am missing with the latest release ?
Bingo!!!
I got the problem. actually xcopy command is not generating properly in MyBrackets.vscsproj file. and this is well know problem i think so. To fix this problem one fix-msvc.sh file has written.
Since brackets.vscsproj name is hardcoded here so changes is not reflecting in my MyBrackets.vscsproj

Protractor with Mocha/Chai don't display errors since 1.8.0 migration

I'm having a lot E2E tests done with Protractor 1.3.1 / Mocha 1.21.4 and Chai 1.9.1.
Since I migrate to Protractor 1.8.0, Mocha 2.2.1, I've got no error description when a test fail. This make very hard to find what is wrong.
Example :
We are connected to mongo !
Show/hide login bar :
√ Should see the login bar
√ Should see the loggin button
√ Should not see the loggout button
Account creation popup :
√ Should see the create account form (944ms)
√ Should not be able to submit the form
√ Should be possible to submit the form after checking the CG (1102ms)
√ Should not be possible to submit the form without typing email, pseudo and accountType (530ms)
√ Should be possible to submit the form with email, pseudo and accountType (2325ms)
√ Should be possible to create an account by submitting the form (1423ms)
√ Should not be possible to create an account already existing and activated
Show direct account creation popup :
√ Should display accountCreationPopup when calling /create-account.html (1980ms)
Exception thrown: Keeping the Selenium server alive
d:\Projets\Clouderial\nodeProjects\cld-apps\node_modules\grunt-protractor-runner\node_modules\protractor\node_modules\selenium-webdriver\lib\atoms\error.js:113
var template = new Error(this.message);
^
>>
>> Test failed but keep the grunt process alive.
I've tried with different Mocha reporter but without success.
Any cluse would be greatly appreciated.
Jean-Marc
Edit :
I've notice that the problem appears only when protractor is run with grunt and grunt-protractor-runner
Running protractor with grunt-protractor-runner outside Grunt works. The command is run like this :
node_modules/grunt-protractor-runner/node_modules/protractor/bin/protractor test/protractor/e2e.conf.js
Same command with same config runned by grunt mask the errors.
EDIT 2 :
The colors in Mocha reporter are not displayed when running inside Grunt and are normally displayed outside Grunt. Maybe it will give some clues to what happens.
I ran into a similar issue for jasmine-spec-reporter and with the help of #bcaudan I think the problem has been found. What I had to do was set the enabled property of colors to true:
var colors = require('colors');
colors.enabled = true;
Here is the initial thread where the issue was discussed.
Here is the thread that shows the current fix for the issue.

Resources