View nightwatch.json
{ | |
"src_folders" : ["./tests"], | |
"output_folder" : "./reports", | |
"test_workers": { | |
"enabled": true, | |
"workers": "auto" | |
}, | |
"selenium" : { | |
"start_process" : false, | |
"server_path" : "", |
View nightwatchGoogleSearch.js
module.exports = { | |
'NW test on Google' : function (client) { | |
client | |
.url('http://www.google.com') | |
.waitForElementVisible('body', 1000) | |
.assert.title('Google') | |
.assert.visible('input[type=text]') | |
.setValue('input[type=text]', 'Nightwatch JS') | |
.waitForElementVisible('button[name=btnG]', 1000) | |
.click('button[name=btnG]') |
View nightwatch.json
{ | |
"src_folders" : ["tests"], | |
"output_folder" : "reports", | |
"test_workers": { | |
"enabled": true, | |
"workers": "auto" | |
}, | |
"selenium" : { | |
"start_process" : true, | |
"server_path" : "node_modules/selenium-standalone/.selenium/selenium-server/", |
View seleniumwdio.config.txt
exports.config = { | |
runner: 'local', | |
hostname: 'CLOUDURL',// e.g., demo.experitest.com | |
protocol: 'https', | |
port: 443, | |
services: ['appium'], | |
path: '/wd/hub', | |
specs: [ | |
'./test/specs/**/*.js' |
View helloworld.txt
const assert = require('assert') | |
describe('webdriver.io page', () => { | |
it('should have the right title', () => { | |
browser.url('https://experitest.com') | |
const title = browser.getTitle() | |
assert.strictEqual(title, 'Experitest: Mobile App & Cross-Browser Testing End-to-End') | |
}) | |
}) |
View calendarinvite.txt
using Ical.Net; | |
using Ical.Net.DataTypes; | |
using Ical.Net.Serialization.iCalendar.Serializers; | |
using Ical.Net.Serialization; | |
... | |
... | |
... | |
MailMessage message = new MailMessage(); | |
message.To.Add("naik899@gmail.com"); |
View MyCorsPolicy.txt
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Class, AllowMultiple = false)] | |
public class MyCorsPolicy : Attribute, ICorsPolicyProvider | |
{ | |
private CorsPolicy _policy; | |
public MyCorsPolicy() | |
{ | |
// Create a CORS policy. | |
_policy = new CorsPolicy | |
{ |
View TestController.txt
using System.Net.Http; | |
using System.Web.Http; | |
using System.Web.Http.Cors; | |
[EnableCors(origins: "http://ravindranaik.com", headers: "*", methods: "*")] | |
public class TestController : ApiController | |
{ | |
// ... | |
} |
View WebApiConfig.Txt
using System.Web.Http; | |
public static class WebApiConfig | |
{ | |
public static void Register(HttpConfiguration config) | |
{ | |
//Enable CORS - Add this line | |
config.EnableCors(); | |
// Web API routes |
View txt
using System; | |
using System.Web; | |
namespace HtmlMinification | |
{ | |
public class HttpModule : IHttpModule | |
{ | |
void IHttpModule.Init(HttpApplication context) | |
{ | |
context.BeginRequest += ContextBeginRequest; |
NewerOlder