Skip to content

Commit

Permalink
Fix the test error when connect with YWinAppDriver
Browse files Browse the repository at this point in the history
  • Loading branch information
licanhua committed Nov 15, 2020
1 parent eb26dc8 commit cb45b4f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions example/Pages/CalculatorPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ class CalculatorPage extends PageObject {
get clearButton() { return By2.nativeName('Clear'); }
get plusButton() { return By2.nativeName('Plus'); }
get divideButton() { return By2.nativeAccessibilityId('divideButton'); }
get multiplyButton() { return By2.nativeXpath("//Button[@Name='Multiply by']") }
get minusButton() { return By2.nativeXpath("//Button[@AutomationId=\"minusButton\"]"); }
get multiplyButton() { return By2.nativeAccessibilityId("multiplyButton") }
get minusButton() { return By2.nativeAccessibilityId("minusButton"); }
get button0() { return By2.nativeAccessibilityId('num0Button'); }
get button1() { return By2.nativeAccessibilityId('num1Button'); }
get button2() { return By2.nativeAccessibilityId('num2Button'); }
Expand Down
2 changes: 1 addition & 1 deletion example/__tests__/Calculator.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ async function getCalculatorResultText() {
describe('Addition', () => {
// Applies only to tests in this describe block
beforeEach(() => {
return By2.nativeName('Clear').clear();
return By2.nativeName('Clear').click();
});
test('Addition', async () => {
// Find the buttons by their names and click them in sequence to perform 1 + 7 = 8
Expand Down
2 changes: 1 addition & 1 deletion example/__tests__/CalculatorWithPageObject.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ describe('Calulator Test', () => {
// Applies only to tests in this describe block
beforeEach(async () => {
await CalculatorPage.waitForPageLoaded();
await CalculatorPage.clearButton.clear();
await CalculatorPage.clearButton.click();
});
test('Addition', async () => {
// Find the buttons by their names and click them in sequence to perform 1 + 7 = 8
Expand Down

0 comments on commit cb45b4f

Please sign in to comment.