Giter Site home page Giter Site logo

Comments (4)

JacksonGL avatar JacksonGL commented on May 9, 2024

@QAInsights Please use the API mentioned in the documentation.

MemLab doesn't provide callback accessories or apparel. Use action instead:

function url() {
  console.log("Returning URL");
  return 'https://store.qainsights.com/';
}

async function action(page) {
  console.log("Click on Accessories link");
  await page.click('//a[href="/accessories"]');
}

async function back(page) {
  console.log("Go to Home page");
  await page.click('//a[href="/"]');
}

module.exports = {action, back, url};
function url() {
  console.log("Returning URL");
  return 'https://store.qainsights.com/';
}

async function action(page) {
  console.log("Click on Apparel link");
  await page.click('//a[href="/apparel"]');
}

async function back(page) {
  console.log("Go to Home page");
  await page.click('//a[href="/"]');
}

module.exports = {action, back, url};

PS: console.log is not recommended in test script as it will disrupt the memlab console output.

from memlab.

JacksonGL avatar JacksonGL commented on May 9, 2024

Also double check the correctness of the css selector. The website under test is having some infinite loop dumping tons of console.error messages in web console

from memlab.

QAInsights avatar QAInsights commented on May 9, 2024

Thank @JacksonGL I was using Firefox to inspect the elements. In FF Console, I do not see any recursive errors, but in Chrome it is showing up. Below code is working fine, but it is crashing due to recursive logging.

Let me try with another app.

const scenario = {
  url: () => 'https://store.qainsights.com/',
  action: async (page) => {
    await page.click('a[href="/apparel"]');
  },
  back: async (page) => {
    await page.click('a[href="/"]');
  },
}

module.exports = scenario;

from memlab.

QAInsights avatar QAInsights commented on May 9, 2024

@JacksonGL Finally I was able to take a snapshot :)

const scenario = {
  url: () => 'https://academy.qainsights.com/courses',
  action: async (page) => {
    await page.click('a[href="/about"]');
  },
  back: async (page) => {
    await page.click('a[href="/courses"]');
  },
}

module.exports = scenario;

from memlab.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.