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

If Web Element Exists error #166

Closed
AlanGould opened this issue Nov 26, 2019 · 3 comments
Closed

If Web Element Exists error #166

AlanGould opened this issue Nov 26, 2019 · 3 comments

Comments

@AlanGould
Copy link

AlanGould commented Nov 26, 2019

Hi, great job with taskt!

I am running into an error with executing a "Begin If" command:


2019-11-26 19:04:47.256 +10:00 [INF] Running Line 19: Navigate to URL [URL: '_url removed_', Instance Name: 'instance_name']
2019-11-26 19:04:50.177 +10:00 [INF] Skipping Line 20: // Comment: Check for Bill Overview
2019-11-26 19:04:50.212 +10:00 [INF] Running Line 21: If Web Element Exists [Find Element By XPath: //div[contains(@class, '.selected_item')]]
2019-11-26 19:04:50.215 +10:00 [INF] Result Code: Error
2019-11-26 19:04:50.215 +10:00 [INF] Error: System.Exception: App Instance 'default' not found!
   at taskt.Core.Automation.Engine.AutomationEngineInstance.ExecuteCommand(ScriptAction command)
   at taskt.Core.Automation.Engine.AutomationEngineInstance.ExecuteScript(String data, Boolean dataIsFile)

Also, I did find a previous issue regarding "If Web Element Exists" - initially I was using a variable ("instance_name" set to "[DateTime.Now]") for the Selenium Instance Name, so I tried removing the variable and just using the plain string, but the error still occurs.

@AlanGould
Copy link
Author

Update - I just reverted to naming the Instance Name "default" given the "If Web Element Exists" seemed to ignore the specified Instance Name. Here's a log snippet:

Create Chrome Browser - [Instance Name: 'default', Instance Tracking: Keep Instance Alive]

The outcome was that the "If Web Element Exists" worked as expected, without error. Thus, the issue is with the "If Web Element Exists" incorrectly referencing the "Selenium Instance Name" in the Additional Parameters.

@saucepleez
Copy link
Owner

@AlanGould Thanks for reporting this. I have confirmed the behavior described -- custom instance names are not handled properly specifically by the If Command.

@saucepleez
Copy link
Owner

The fix will be reflected in the next pull request and release.

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

No branches or pull requests

2 participants