@auxcode/auxta 0.3.5 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@auxcode/auxta",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "",
5
5
  "main": "src/AuxTA.ts",
6
6
  "scripts": {
@@ -22,7 +22,7 @@ export class FunctionHelper {
22
22
  public async clickByText(selector: string, text: string, page = puppeteer.defaultPage) {
23
23
  const message = `I click on the '${text}' '${selector}'`;
24
24
  try{
25
- const [linkHandlers] = await page.$x(`//${selector}[. = ${this.getEscapedText(text)}]`);
25
+ const [linkHandlers] = await page.$x(`//${selector}[text() = ${this.getEscapedText(text)}]`);
26
26
 
27
27
  if (linkHandlers) {
28
28
  await linkHandlers.click();
@@ -41,7 +41,7 @@ export class FunctionHelper {
41
41
  await page.waitForSelector(selector, {
42
42
  timeout: this.defaultTimeout
43
43
  });
44
- const linkHandlers = await page.$x(`//${selector}[. = ${this.getEscapedText(text)}]`);
44
+ const linkHandlers = await page.$x(`//${selector}[text() = ${this.getEscapedText(text)}]`);
45
45
  if (linkHandlers.length > 0) {
46
46
  log.push('And', message, StatusOfStep.PASSED);
47
47
  return true;