taiko icon indicating copy to clipboard operation
taiko copied to clipboard

Issue with the latest version of Taiko

Open dhananjey-oss opened this issue 2 years ago • 7 comments

version Describe the bug Im trying to automate a Salesforce application. The textBox / dropDown and couple of other element(s) were not found . The same Taiko script was working in one machine. After lot of brainstorming within the team we noticed that Taiko version was different in the working vs. non-working machines. So after down grading the non-working machines to 1.2.5, things started working.

*To Reproduce Steps (or script) to reproduce the behavior:

  1. Open the Taiko in REPL
  2. open the browser using the openBrowser() api
  3. Login to the application with proper credentials (Please refer the screen shot for the REPL steps)
  4. navigate to the Application
  5. try to enter a name in the Subject Textbox
const { openBrowser, goto, textBox, into, write, click, button, dropDown, scrollDown, scrollUp, scrollTo, closeBrowser } = require('taiko');
(async () => {
    try {
        await openBrowser();
        await goto("https://xyz.lightning.force.com/lightning");
        await write("xyz",into(textBox("Username")));
        await write("T2334",into(textBox("Password")));
        await click("Log In to Sandbox");
        await click(button("App Launcher"));
        await write("Service Console");
        await click("Service Console");
        await click(button("Show Navigation Menu"));
        await click("Cases");
        await click("Cases");
        await click("New");
        await click("Technical Support");
        await click("Next");      -- Till this step, it works in 1.3.4 as well.
	await waitFor(2000)
        await click(dropDown("Severity"));   -- from this step everything fails in 1.3.4, but the same works in 1.2.5 
        await dropDown("Severity").select("S4 - Low");
        await click(dropDown("Status"));
        await dropDown("Status").select("New");
        await click("Subject");
        await write("Test  Technical 3 Support");
        await click(dropDown("Product"));
        await dropDown("Product").select("Appliance");
        await click(dropDown("Component"));
        await dropDown("Component").select("Appliance Error");
        await click("Save");

    } catch (error) {
        console.error(error);
    } finally {
        await closeBrowser();
    }
})();

 

Logs

Paste any log or error messages here

Expected behavior The script should write the text in the "Subject" textbox

Screenshots If applicable, add screenshots to help explain your problem.

Versions: The script works in Taiko 1.2.5. However, the same script throws error in the 1.3.4 working_script

gauge -v

Additional context I have attached the screen shot of working and non-working script from the working version and non-working version of Taiko Add any other context about the problem here. not_working

dhananjey-oss avatar Aug 05 '22 11:08 dhananjey-oss

While the older version of the Taiko is working good with REPL. Now Im getting error in the VSCode while trying to use the same older version taiko script with Gauge. MicrosoftTeams-image (2)

I even tried downgrading the Gauge versions. But it did not help me.

dhananjey-oss avatar Aug 05 '22 15:08 dhananjey-oss

Is there a test Salesforce app publicly available to reproduce this? It's going to be difficult without this since it's probably specific to the Salesforce application.

I understand that this used to work for you in an older version, but without being able to reproduce it, nobody can say what the issue is. click() on a text(string) generally works in taiko, so there's something about this application that is incompatible with 1.3.x and not obvious.

marques-work avatar Nov 30 '22 04:11 marques-work

Hi Marues - Anyone can sign up for their own Salesforce Dev Org from here https://developer.salesforce.com/signup

dhananjey-oss avatar Nov 30 '22 04:11 dhananjey-oss

@dhananjey-oss I've created a dev instance, but I'm not seeing the same controls you refer to in your script. I'm trying to go through this manually to understand what the intent is.

I don't see things like "Technical Support". Maybe share your latest version or tell me if there are additional configuration that I need to do in order to reproduce this?

marques-work avatar Nov 30 '22 06:11 marques-work

I also may not get to this until later this week. It's late now (10:15p local time) so I'll probably sign off for the night.

marques-work avatar Nov 30 '22 06:11 marques-work

I understand that this used to work for you in an older version, but without being able to reproduce it, nobody can say what the issue is. click() on a text(string) generally works in taiko, so there's something about this application that is incompatible with 1.3.x and not obvious.

Agree with @marques-work.

In all, thanks @dhananjey-oss for pointing the error out and doing your best to share screenshots. But it's best to pick it up only when there is a clearly reproducible script that can be run locally and debugged.

zabil avatar Nov 30 '22 09:11 zabil

Hi all,

I am facing same kind of issue with [email protected]. I have created a issue on the same My script is working on 1.2.8 but not on 1.3.9

https://github.com/getgauge/taiko/issues/2702

Is there any workaround for this? @zabil Please do needfull

nithindasgaddam avatar Apr 17 '23 09:04 nithindasgaddam