This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// cypress | |
cy.get('table tr') | |
.each(function ($tr , index, $list){ | |
if($tr[0].children[2].innerHTML == criteria) | |
{ | |
cy.wrap($tr[0].children[0].children[0].children[0].children[0]).click() | |
} | |
}) | |
//testcafe |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { ClientFunction } from 'testcafe'; | |
const performAsyncOperation = ClientFunction(() => { | |
return Promise | |
.resolve() | |
.then(asyncFn) | |
.then(otherAsyncFn); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Selector } from 'testcafe'; | |
var jQuery = Selector(selector => { | |
return jQuery(selector).toArray(); | |
}); | |
fixture `Check jQuery approach` | |
.page `https://jquery.com/`; | |
test('test', async t => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
await t | |
.expect(items.count).eql(0) | |
.typeText(newTodoInput, 'Item 1') | |
.pressKey('enter') | |
.expect(items.count).eql(2) // replace 1 with 2 | |
.expect(items.nth(0).find('label').textContent).eql('Item 1'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Page from './page-object'; | |
const page = new Page(); | |
fixture `SVG` | |
.page('./vue/examples/svg/index.html'); | |
test('Add a stat', async t => { | |
await t | |
.expect(page.axisLabels.count).eql(6) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Page from './page-object'; | |
const page = new Page(); | |
fixture `SVG` | |
.page('./vue/examples/svg/index.html'); | |
test('Add a stat', async t => { | |
await t | |
.expect(page.axisLabels.count).eql(6) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.axisLabels = VueSelector('axis-label'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.addForm = { | |
input: Selector('input[name=newlabel]'), | |
btnAdd: Selector('button').withText('Add a Stat') | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import VueSelector from 'testcafe-vue-selectors'; | |
import { Selector } from 'testcafe'; | |
export default class SvgPage { | |
constructor () { | |
this.addForm = { | |
input: Selector('input[name=newlabel]'), | |
btnAdd: Selector('button').withText('Add a Stat') | |
}; | |
this.axisLabels = VueSelector('axis-label'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { props, state, computed } = await VueSelector('todo-item').getVue(); |