UCWA Skype for Business Online API Authentication - 403 Forbidden Applications Resource - skype-for-business

I'm following this guide (https://msdn.microsoft.com/en-us/skype/ucwa/authenticationusingazuread) to attempt and authenticate and create a Skype App.
My goal is to create a Skype Meeting via the API and generate an Online Meeting URL.
I'm able to get as far as generating the Applications Resource URL.
When I attempt POST to the URL I receive a 403 Forbidden error. Looks like there might be an issue with the token? However I am using the token in earlier requests to get the App URL.
Any thoughts on what I am doing wrong?
Post Request:
POST https://webpool.infra.lync.com/ucwa/oauth/v1/applications HTTP/1.1
Connection: Keep-Alive
Content-Type: application/json; charset=utf-8
Authorization: Bearer (edited)
x-ms-request-root-id: a9c17f66-46d761cf7325d6a7
x-ms-request-id: |a9c17f66-46d761cf7325d6a7.6.
Request-Id: |a9c17f66-46d761cf7325d6a7.6.1.
Content-Length: 96
Host: webpoolblu0b11.infra.lync.com
{ UserAgent = UCWA Samples, EndpointId = f87e1d57-83a4-4f9b-aac7-00f05f440637, Culture = en-US }
Post Response:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>403 - Forbidden: Access is denied.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>403 - Forbidden: Access is denied.</h2>
<h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3>
</fieldset></div>
</div>
</body>
</html>
Permissions:

I've figured this out. I wasn't serializing the JSON properly. Below is a fixed snippet:
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
var jsonObject = new
{
UserAgent = "UCWA Samples",
EndpointId = Guid.NewGuid().ToString(),
Culture = "en-US"
};
var createMeetingPostData = JsonConvert.SerializeObject(jsonObject);
var content = new StringContent(createMeetingPostData, Encoding.UTF8, "application/json");
var data = await client.PostAsync(appUrlData.appUrl, content);

Related

WebdriverIO giving errors when trying to run tests

I'm having problems running my WebdriverIO tests and I think it's to do with how I'm handling running behind a corporate proxy. Things used to work fine but suddenly they have stopped and after a few hours trying various things I've run out of ideas.
My proxy details are saved as windows system variables in the name of http_proxy and https_proxy. I haven't changed these. The format I'm using for a variable is like this - http://myusername:mypassword#myproxyaddress:8080.
I also get errors when connecting to the internet through an external connection so I'm not 100% its the proxy causing this.
I've tried update all my packages so my package file now looks like this:
{
"name": "name",
"version": "1.0.0",
"description": "UI Tests",
"main": "index.js",
"scripts": {
"test": "node_modules/.bin/wdio ./wdio.conf.js"
},
"author": "Matt Thomas",
"license": "ISC",
"devDependencies": {
"#wdio/dot-reporter": "^5.18.6",
"#wdio/local-runner": "^5.18.6",
"#wdio/mocha-framework": "^5.18.6",
"#wdio/selenium-standalone-service": "^5.16.10",
"#wdio/spec-reporter": "^5.18.6",
"#wdio/sync": "^5.18.6",
"chai": "^4.2.0",
"chai-webdriverio": "^1.0.0",
"chromedriver": "^79.0.3",
"local-runner": "^0.1.1-alpha",
"wdio-chromedriver-service": "^5.0.2",
"webdriver": "^5.18.6"
},
"dependencies": {
"#wdio/cli": "^5.18.6"
}
}
My wdio.conf.js file is here(comments stripped out from actual file):
exports.config = {
specs: [
'./test/**/*.js'
],
// Patterns to exclude.
exclude: [
// 'path/to/excluded/files'
],
maxInstances: 10,
capabilities: [{
maxInstances: 5,
browserName: 'chrome'
}],
logLevel: 'trace',
bail: 0,
baseUrl: 'https://apps-dev.bhp.com/moc/',
waitforTimeout: 15000,
connectionRetryTimeout: 90000,
connectionRetryCount: 3,
services: ['chromedriver','selenium-standalone'],
framework: 'mocha',
reporters: ['spec','dot'],
mochaOpts: {
ui: 'bdd',
timeout: 120000
},
beforeTest: function (test, context) {
const chai = require('chai')
const chaiWebdriver = require('chai-webdriverio').default
chai.use(chaiWebdriver(browser))
global.assert = chai.assert
global.should = chai.should
global.expect = chai.expect
},
}
And my terminal when i run the test:
PS C:\Test Automation\Projects\WebdriveriO\GlobalMoC> npm test -- --spec ./test/login.test.js
> globalmoc#1.0.0 test C:\Test Automation\Projects\WebdriveriO\GlobalMoC
> wdio ./wdio.conf.js "--spec" "./test/login.test.js"
Execution of 1 spec files started at 2020-02-14T00:54:12.038Z
2020-02-14T00:54:12.042Z DEBUG #wdio/utils:initialiseServices: initialise wdio service "chromedriver"
2020-02-14T00:54:12.131Z DEBUG #wdio/utils:initialiseServices: initialise wdio service "selenium-standalone"
2020-02-14T00:54:12.204Z INFO #wdio/cli:launcher: Run onPrepare hook
Starting ChromeDriver 79.0.3945.36 (3582db32b33893869b8c1339e8f4d9ed1816f143-refs/branch-heads/3945#{#614}) on port 4444
Only local connections are allowed.
Please protect ports used by ChromeDriver and related test frameworks to prevent access by malicious code.
2020-02-14T00:54:12.793Z ERROR #wdio/cli:utils: A service failed in the 'onPrepare' hook
Error: Could not download https://selenium-release.storage.googleapis.com/3.14/IEDriverServer_Win32_3.14.0.zip: Error: unable to get local issuer certificate
at Request.<anonymous> (C:\Test Automation\Projects\WebdriveriO\GlobalMoC\node_modules\selenium-standalone\lib\install.js:387:12)
at Object.onceWrapper (events.js:286:20)
at Request.emit (events.js:198:13)
at Request.EventEmitter.emit (domain.js:448:20)
at Request.onRequestError (C:\Test Automation\Projects\WebdriveriO\GlobalMoC\node_modules\request\request.js:881:8)
at ClientRequest.emit (events.js:198:13)
at ClientRequest.EventEmitter.emit (domain.js:448:20)
at TLSSocket.socketErrorListener (_http_client.js:392:9)
at TLSSocket.emit (events.js:198:13)
at TLSSocket.EventEmitter.emit (domain.js:448:20)
Continue...
2020-02-14T00:54:12.831Z INFO #wdio/local-runner: Start worker 0-0 with arg: ./wdio.conf.js,--spec,./test/login.test.js
[0-0] 2020-02-14T00:54:14.120Z INFO #wdio/local-runner: Run worker command: run
[0-0] RUNNING in chrome - C:\Test Automation\Projects\WebdriveriO\GlobalMoC\test\login.test.js
[0-0] 2020-02-14T00:54:14.473Z DEBUG #wdio/local-runner:utils: init remote session
[0-0] 2020-02-14T00:54:14.477Z INFO webdriverio: Initiate new session using the webdriver protocol
2020-02-14T00:54:14.481Z INFO webdriver: [POST] http://127.0.0.1:4444/session
2020-02-14T00:54:14.482Z INFO webdriver: DATA { capabilities:
{ alwaysMatch: { browserName: 'chrome' }, firstMatch: [ {} ] },
desiredCapabilities: { browserName: 'chrome' } }
[0-0] 2020-02-14T00:54:14.629Z DEBUG webdriver: request failed due to missing body
[0-0] 2020-02-14T00:54:14.630Z WARN webdriver: Request failed due to <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>406 - Client browser does not accept the MIME type of the requested page.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>406 - Client browser does not accept the MIME type of the requested page.</h2>
<h3>The page you are looking for cannot be opened by your browser because it has a file name extension that your browser does not accept.</h3>
</fieldset></div>
</div>
</body>
</html>
[0-0] 2020-02-14T00:54:14.630Z INFO webdriver: Retrying 1/3
2020-02-14T00:54:14.630Z INFO webdriver: [POST] http://127.0.0.1:4444/session
2020-02-14T00:54:14.630Z INFO webdriver: DATA { capabilities:
{ alwaysMatch: { browserName: 'chrome' }, firstMatch: [ {} ] },
desiredCapabilities: { browserName: 'chrome' } }
2020-02-14T00:54:14.661Z DEBUG webdriver: request failed due to missing body
2020-02-14T00:54:14.661Z INFO webdriver: Retrying 2/3
2020-02-14T00:54:14.661Z INFO webdriver: [POST] http://127.0.0.1:4444/session
2020-02-14T00:54:14.661Z INFO webdriver: DATA { capabilities:
{ alwaysMatch: { browserName: 'chrome' }, firstMatch: [ {} ] },
desiredCapabilities: { browserName: 'chrome' } }
[0-0] 2020-02-14T00:54:14.661Z WARN webdriver: Request failed due to <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>406 - Client browser does not accept the MIME type of the requested page.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>406 - Client browser does not accept the MIME type of the requested page.</h2>
<h3>The page you are looking for cannot be opened by your browser because it has a file name extension that your browser does not accept.</h3>
</fieldset></div>
</div>
</body>
</html>
2020-02-14T00:54:14.691Z WARN webdriver: Request failed due to <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>406 - Client browser does not accept the MIME type of the requested page.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>406 - Client browser does not accept the MIME type of the requested page.</h2>
<h3>The page you are looking for cannot be opened by your browser because it has a file name extension that your browser does not accept.</h3>
</fieldset></div>
</div>
</body>
</html>
2020-02-14T00:54:14.722Z ERROR webdriver: Request failed due to Error: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>406 - Client browser does not accept the MIME type of the requested page.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>406 - Client browser does not accept the MIME type of the requested page.</h2>
<h3>The page you are looking for cannot be opened by your browser because it has a file name extension that your browser does not accept.</h3>
</fieldset></div>
</div>
</body>
</html>
at getErrorFromResponseBody (C:\Test Automation\Projects\WebdriveriO\GlobalMoC\node_modules\webdriver\build\utils.js:117:12)
at Request._callback (C:\Test Automation\Projects\WebdriveriO\GlobalMoC\node_modules\webdriver\build\request.js:111:64)
at Request.self.callback (C:\Test Automation\Projects\WebdriveriO\GlobalMoC\node_modules\request\request.js:185:22)
at Request.emit (events.js:198:13)
at Request.EventEmitter.emit (domain.js:448:20)
at Request.<anonymous> (C:\Test Automation\Projects\WebdriveriO\GlobalMoC\node_modules\request\request.js:1161:10)
at Request.emit (events.js:198:13)
at Request.EventEmitter.emit (domain.js:448:20)
at IncomingMessage.<anonymous> (C:\Test Automation\Projects\WebdriveriO\GlobalMoC\node_modules\request\request.js:1083:12)
at Object.onceWrapper (events.js:286:20)
2020-02-14T00:54:14.723Z ERROR webdriver: Error: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>406 - Client browser does not accept the MIME type of the requested page.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>406 - Client browser does not accept the MIME type of the requested page.</h2>
<h3>The page you are looking for cannot be opened by your browser because it has a file name extension that your browser does not accept.</h3>
</fieldset></div>
</div>
</body>
</html>
at getErrorFromResponseBody (C:\Test Automation\Projects\WebdriveriO\GlobalMoC\node_modules\webdriver\build\utils.js:117:12)
at Request._callback (C:\Test Automation\Projects\WebdriveriO\GlobalMoC\node_modules\webdriver\build\request.js:111:64)
at Request.self.callback (C:\Test Automation\Projects\WebdriveriO\GlobalMoC\node_modules\request\request.js:185:22)
at Request.emit (events.js:198:13)
at Request.EventEmitter.emit (domain.js:448:20)
at Request.<anonymous> (C:\Test Automation\Projects\WebdriveriO\GlobalMoC\node_modules\request\request.js:1161:10)
at Request.emit (events.js:198:13)
at Request.EventEmitter.emit (domain.js:448:20)
at IncomingMessage.<anonymous> (C:\Test Automation\Projects\WebdriveriO\GlobalMoC\node_modules\request\request.js:1083:12)
at Object.onceWrapper (events.js:286:20)
2020-02-14T00:54:14.724Z ERROR #wdio/runner: Error: Failed to create session.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>406 - Client browser does not accept the MIME type of the requested page.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>406 - Client browser does not accept the MIME type of the requested page.</h2>
<h3>The page you are looking for cannot be opened by your browser because it has a file name extension that your browser does not accept.</h3>
</fieldset></div>
</div>
</body>
</html>
at startWebDriverSession (C:\Test Automation\Projects\WebdriveriO\GlobalMoC\node_modules\webdriver\build\utils.js:45:11)
at process._tickCallback (internal/process/next_tick.js:68:7)
[0-0] Error: Failed to create session.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>406 - Client browser does not accept the MIME type of the requested page.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>406 - Client browser does not accept the MIME type of the requested page.</h2>
<h3>The page you are looking for cannot be opened by your browser because it has a file name extension that your browser does not accept.</h3>
</fieldset></div>
</div>
</body>
</html>
[0-0] 2020-02-14T00:54:14.691Z DEBUG webdriver: request failed due to missing body
2020-02-14T00:54:14.691Z INFO webdriver: Retrying 3/3
2020-02-14T00:54:14.691Z INFO webdriver: [POST] http://127.0.0.1:4444/session
2020-02-14T00:54:14.692Z INFO webdriver: DATA { capabilities:
{ alwaysMatch: { browserName: 'chrome' }, firstMatch: [ {} ] },
desiredCapabilities: { browserName: 'chrome' } }
2020-02-14T00:54:14.722Z DEBUG webdriver: request failed due to missing body
2020-02-14T00:54:15.284Z DEBUG #wdio/local-runner: Runner 0-0 finished with exit code 1
[0-0] FAILED in chrome - C:\Test Automation\Projects\WebdriveriO\GlobalMoC\test\login.test.js
2020-02-14T00:54:15.302Z INFO #wdio/cli:launcher: Run onComplete hook
Spec Files: 0 passed, 1 failed, 1 total (100% completed) in 00:00:03
2020-02-14T00:54:15.306Z INFO #wdio/local-runner: Shutting down spawned worker
2020-02-14T00:54:15.569Z INFO #wdio/local-runner: Waiting for 0 to shut down gracefully
2020-02-14T00:54:15.578Z INFO #wdio/local-runner: shutting down
npm ERR! Test failed. See above for more details.
Since you are trying to use selenium standalone service and behind a proxy, you should include below settings in your config file. This is working for me. I have included some documents you can refer to.
skipSeleniumInstall: false,
seleniumInstallArgs: {
requestOpts: {
strictSSL: false,
timeout: 10000,
proxy: proxyurl,
},
},
https://webdriver.io/docs/selenium-standalone-service.html#skipseleniuminstall
WebdriverIO: How to fix error "unknown error: cannot get automation extension"?
Cheers!

Dompdf size reduction working well in Localhost but not in live

Size reduction code working well in localhost but when i test it live my pdf page showing blank with this code ($dompdf->getOptions()->setIsFontSubsettingEnabled(true);)
and when i remove above line ..pdf is working fine but size is 18MB.i want to reduce my pdf size to 50KB with this same font family.
$html = '<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type: application/pdf; charset=utf-8"/>
<link rel="stylesheet" href="style.css">
<div style="width:800px; height:970px; padding:20px; border: 10px solid #787878">
<style>
body {
body {font-family: "NotoSansCJKtc-Regular"}
}
</style>
<div style="width:750px; height:915px; padding:20px; border: 5px solid #787878">
//pdf content is here
</div>
</div>
</html>';
$dompdf->loadHtml($html);
$dompdf->setPaper('A4', 'landscape');
$dompdf->getOptions()->setIsFontSubsettingEnabled(true);
/* Render the HTML as PDF */
$dompdf->render();
header('Content-Type: application/pdf; charset=utf-8');
header('Content-disposition: inline; filename="' . $no . '.pdf"', true);
/* Output the generated PDF to Browser */
$dompdf->stream();

Python 3.5 beautifulsoup unable to read page

When I go through the following process:
open link in browser: http://propaccess.traviscad.org/clientdb/?cid=1
in property search box type: Jim and hit search
click on column view details of the first result
The above steps takes me to the following url:
http://propaccess.traviscad.org/clientdb/Property.aspx?prop_id=228792
where you can see the data.
However, if I use the following code:
from urllib2 import urlopen
from BeautifulSoup import BeautifulSoup
url = 'http://propaccess.traviscad.org/clientdb/Property.aspx?prop_id=312669'
soup = BeautifulSoup(urlopen(url).read())
print soup
I get the error:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-type" content="text/html;charset=utf-8" />
<title>Travis Property Search</title>
<style type="text/css">
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
#article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
</head>
<body>
<div id="article">
<h1>Please try again</h1>
<div>
<p>Sorry for the inconvenience but your session has either timed out or the server is busy handling other requests. You may visit us on the the following website for information, otherwise please retry your search again shortly:<br /><br />
Travis Central Appraisal District Website </p>
<p><b>Click here to reload the property search to try again</b></p>
</div>
</div>
</body>
</html>
I have tried other ways of importing cookie, etc but I am not able to read the data using python.
Try something like this:
import requests
from bs4 import BeautifulSoup
s = requests.session()
r = s.get('http://propaccess.traviscad.org/clientdb/?cid=1')
r2 = s.get('http://propaccess.traviscad.org/clientdb/Property.aspx?prop_id=312669')
soup = BeautifulSoup(r2.text, 'html.parser')
print(soup.prettify())
This will grab the page that establishes the session and requests.session will save the session data. On the next request it will use the session cookie and grab your text. You should be able to hand that text to BeautifulSoup for parsing.

iTextSharp HTML to PDF using Font Awesome

I am already successfully converting HTML to PDF using iTextSharp/XMLWorkerHelper. So far, I have been able to apply internal styling to the HTML as shown below. This works just fine. However, when I try to use a CDN to utilize Font Awesome, I am having no such luck.
This is what my HTML looks like:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title></title>
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
<style>
body {
color: #000000;
font-size: 14px;
font-family: Arial, Helvetica, sans-serif;
}
</style>
</head>
<body>
<i class="fa fa-briefcase"></i>
</body>
</html>
And this is how I'm converting the HTML to a memory stream which is ultimately used to create the PDF via FileStreamResult (the FileStreamResult is closing the memory stream).
string html = "<html here>";
var ms = new MemoryStream();
using (var doc = new Document())
{
using (var writer = PdfWriter.GetInstance(doc, ms))
{
doc.Open();
using (var srHtml = new StringReader(html))
{
XMLWorkerHelper.GetInstance().ParseXHtml(writer, doc, srHtml);
}
writer.CloseStream = false;
doc.Close();
}
}
Why am I not able to see the briefcase on my generated PDF?

401 error for apps outside Rally

I am creating a app that can be displayed outside rally. I created a login key for a read-only user as described in the documentation and substituted it for [loginkey] in the code below. When i try to access the app I am being asked for user credentials again. When i cancel the authentication dialog i receive a 401 error in the developer tools in the browser. Please find my code below.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>LoginKey</title>
<!--App information-->
<meta name="Name" content="App: LoginKey"/>
<meta name="Version" content="1.0"/>
<meta name="Vendor" content=""/>
<!--Include SDK-->
<script type="text/javascript" src="https://rally1.rallydev.com/apps/1.32/sdk.js?loginkey=[loginkey]"></script>
<script type="text/javascript">
function onLoad() {
var rallyDataSource = new rally.sdk.data.RallyDataSource(
'__WORKSPACE_OID__',
'__PROJECT_OID__',
'__PROJECT_SCOPING_UP__',
'__PROJECT_SCOPING_DOWN__');
rallyDataSource.setApiVersion("1.43");
var config = {type: "hierarchicalrequirement", columnKeys:["FormattedID", "Name"]};
var table = new rally.sdk.ui.Table(config, rallyDataSource);
table.display("tableDiv");
}
rally.addOnLoad(onLoad);
</script>
<style type="text/css">
.loginKey {
/* Add app styles here */
}
</style>
</head>
<body class="loginKey">
<div id="tableDiv" style="float:left;width:400px"></div>
</body>
</html>
The issue was with the name of the parameter. I was using loginkey for the name of the parameter while it was actually supposed to be loginKey