Skip to content
hekra01 edited this page Sep 9, 2015 · 58 revisions

Build

Example build in Ubuntu

  • Uninstall gyp provided by Ubuntu:
    $ sudo apt-get remove gyp
  • Clone gyp and install it:
    $ git clone https://chromium.googlesource.com/external/gyp.git
    $ sudo apt-get install python-pip
    $ sudo pip install setuptools
    $ cd ./gyp
    $ sudo python setup.py install
  • Install dependencies:
    $ sudo apt-get install g++
  • Create a configuration file wd.gypi, e.g:
$ cat wd.gypi
{
'variables': {
    'QT5': '1', # change to '0' to disable Qt5
    'WD_CONFIG_QWIDGET_BASE': '1', # 1 to support widget or hybrid web
    'WD_CONFIG_WEBKIT': '1', #1 to support Web views
    'WD_CONFIG_QUICK': '1', #1 to support QML
    'WD_BUILD_MONGOOSE': '1', #1 to inline mongoose code in WebDriver libraries. Otherwise CISCO_MONGOOSE paths below will be needed
    'WD_CONFIG_PLAYER': '0', #Set to 1 if qtmultimedia should be built. In case of Hawaii Cisco profile, set to 0
    'WD_CONFIG_ONE_KEYRELEASE': '0', # Set to 0 (default). On long key press WD will sendas many key release as key press. If set to 1 only the final key release is sent
    'QT_INC_PATH': '/home/user/Qt/5.2.0/gcc_64/include',
    'QT_BIN_PATH': '/home/user/Qt/5.2.0/gcc_64/bin',
    'QT_LIB_PATH': '/home/user/Qt/5.2.0/gcc_64/lib'
 },
}
  • Build:
    $ ./build.sh ./out
  • Note 1: on Windows, build.bat will create a msvc project Webdriver.sln that should then be built in msvc
  • Note 2: QtWebDriver has no official support for Qt5.3+ yet. Build on 5.3 was succeded with update of icu lib
    $ sudo apt-get install libicu52
    $ ./build.sh ./out

Run

To run the prebuilt binaries

On Windows
# Set Qt environment
D:\test> D:\Qt\5.2.1\msvc2010_opengl\bin\qtenv2.bat vsvars

# Run WebDriver
D:\test> WebDriver.exe
On Linux
# Set Qt environment
$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/user/Qt/5.2.0/gcc_64/lib

# Run WebDriver
$ cd WebDriver-linux64-Qt5.2.0-cisco-cmt-1.3.0/bin/
$ ./WebDriver

See Releases to download the pre-built exes

To build and run your own binary

Clone this wiki locally