説明なし

testWebView.spec.js 557B

12345678910111213141516171819
  1. describe('WebView basic test', () => {
  2. beforeEach(async () => {
  3. await device.launchApp({newInstance: true});
  4. });
  5. it('should have a webview', async () => {
  6. await expect(element(by.id('test_webview'))).toBeVisible();
  7. });
  8. it('should respond to injectJavaScript', async () => {
  9. const hello = await element(by.id('hello'));
  10. await expect(hello).toHaveText('No hello yet');
  11. await element(by.id('test_trigger_button')).tap();
  12. await waitFor(hello)
  13. .toHaveText('Hello from the webview!')
  14. .withTimeout(10000);
  15. });
  16. });