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

Unknow Selenium IDE command during selenium import #2498

Closed
cencio91 opened this issue Oct 10, 2023 · 4 comments
Closed

Unknow Selenium IDE command during selenium import #2498

cencio91 opened this issue Oct 10, 2023 · 4 comments

Comments

@cencio91
Copy link

I'm using "import test case from Selenium IDE", but some instruction are not recognized.

Some examples are:

  • Unknow Selenium IDE command 'waitForElementVisible' on target 'xpath=//nb-alert' with value '5000' - attesa che appaia il popup di errore
  • Unknow Selenium IDE command 'assertText' on target 'css=.alert-message' with value 'Nome utente o password errati'

Is the 100% support of selenium IDE instruction in the roadmap?
It seems that these commands are skipped during execution. this is a problem since I can think that my test end correctly, but the test validation was skipped instead

Thank you

@vertigo17
Copy link
Member

Can you provide the Selenium IDE script that you want to import as an example ?

@cencio91
Copy link
Author

@vertigo17 Of course. I cannot share the original script, but I've created a minimal example that let you reproduce the error.
I'm sorry but I don't understan dhow to attach the file, so I had copied it inline

{ "id": "9eda623d-2e58-4f15-a942-abff0eee3e77", "version": "2.0", "name": "errore", "url": "", "tests": [{ "id": "a02cf9a8-294b-47e1-970f-c66e0d4c8c94", "name": "error", "commands": [{ "id": "0c0d80d5-ea49-45cf-89a2-75709f058e8f", "comment": "", "command": "open", "target": "https://www.google.it/", "targets": [], "value": "" }, { "id": "981a6132-ede6-4166-a3ec-4d804e964195", "comment": "", "command": "setWindowSize", "target": "1538x826", "targets": [], "value": "" }, { "id": "99f31abc-2d93-4c2e-add9-fea574538af3", "comment": "", "command": "verifyText", "target": "linkText=Immagini", "targets": [ ["linkText=Immagini", "linkText"], ["css=.gb_F:nth-child(2) > .gb_E", "css:finder"], ["xpath=//a[contains(text(),'Immagini')]", "xpath:link"], ["xpath=//div[@id='gb']/div/div/div/div[2]/a", "xpath:idRelative"], ["xpath=//a[contains(@href, 'https://www.google.it/imghp?hl=it&ogbl')]", "xpath:href"], ["xpath=//div[2]/a", "xpath:position"], ["xpath=//a[contains(.,'Immagini')]", "xpath:innerText"] ], "value": "Immagini" }, { "id": "0d867f7a-a04b-47fa-b98c-53aff0a2ba40", "comment": "", "command": "waitForElementVisible", "target": "xpath=//img[@alt='Google']", "targets": [ ["css=.lnXdpd", "css:finder"], ["xpath=//img[@alt='Google']", "xpath:img"], ["xpath=//div[5]/div[2]/div/img", "xpath:position"] ], "value": "5000" }, { "id": "ad29aee0-3beb-47fc-94f4-fa1a4717494d", "comment": "This one should give error, since the element is not present", "command": "verifyText", "target": "linkText=Text Not Present", "targets": [ ["linkText=Immagini", "linkText"], ["css=.gb_F:nth-child(2) > .gb_E", "css:finder"], ["xpath=//a[contains(text(),'Immagini')]", "xpath:link"], ["xpath=//div[@id='gb']/div/div/div/div[2]/a", "xpath:idRelative"], ["xpath=//a[contains(@href, 'https://www.google.it/imghp?hl=it&ogbl')]", "xpath:href"], ["xpath=//div[2]/a", "xpath:position"], ["xpath=//a[contains(.,'Immagini')]", "xpath:innerText"] ], "value": "" }] }], "suites": [{ "id": "1450f833-4fff-4cf8-ad3f-b3fcea0a65d6", "name": "Default Suite", "persistSession": false, "parallel": false, "timeout": 300, "tests": [] }], "urls": ["https://google.it/"], "plugins": [] }

Thank you

@vertigo17
Copy link
Member

I added the support for the 2 missing actions from your import file.
Here is the result.

image

Please open a new issue if you need more action mapping.

@cencio91
Copy link
Author

Ok, thank you very much.
In general, I think it's more correct to trigger an execution error in case of unknown action
I wish you a nice day

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

No branches or pull requests

2 participants