Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with the latest version of Taiko #2628

Open
dhananjey-oss opened this issue Aug 5, 2022 · 7 comments
Open

Issue with the latest version of Taiko #2628

dhananjey-oss opened this issue Aug 5, 2022 · 7 comments

Comments

@dhananjey-oss
Copy link

dhananjey-oss commented Aug 5, 2022

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
Copy link
Author

dhananjey-oss commented Aug 5, 2022

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.

@marques-work
Copy link
Contributor

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.

@dhananjey-oss
Copy link
Author

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

@marques-work
Copy link
Contributor

@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
Copy link
Contributor

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.

@zabil
Copy link
Member

zabil commented Nov 30, 2022

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.

@nithindasgaddam
Copy link

nithindasgaddam commented Apr 17, 2023

Hi all,

I am facing same kind of issue with taiko@1.3.9. I have created a issue on the same
My script is working on 1.2.8 but not on 1.3.9

#2702

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

4 participants