selenium-ide icon indicating copy to clipboard operation
selenium-ide copied to clipboard

Selenium IDE tests failing in Selenium Side Runner

Open ghost opened this issue 4 years ago • 24 comments

Banner9Test_SeleniumHQ.side.zip

🐛 Bug Report

A clear and concise description of what the bug is.

I have Selenium IDE test scripts (.side files) that I've created; and I'm running them from the command line, using selenium-side-runner. These test scripts run without error in Selenium IDE, but when I run them using selenium-side-runner they fail.

Here are some typical errors from the failed side-runner execution: TimeoutError: Waiting for element to be located By(css selector, *[id="inp:id"]) Wait timed out after 30114ms TimeoutError: Waiting for element to be located By(xpath, //i[@class='ba ba-close']) Wait timed out after 45048ms TimeoutError: Waiting for element to be located By(css selector, #KEY_BLOCK_CANVAS_keyblckAidyCodeLbt > .ui-button-icon-primary) Wait timed out after 45141ms

For security reasons, I cannot include any code here

To Reproduce

Run the .side file from command line using selenium-side-runner

Expected behavior

The .side file runs without error

Project file reproducing this issue (highly encouraged)

Your form here will not accept .side files. I've tried to paste mine in here, but it will not take it. You're expecting a text, Word, image, pdf, or zipped file. What am I supposed to do???!

Environment

OS: macOS Mojave 10.14.6 Selenium IDE version: 3.17.0 selenium-side-runner version: 3.16.0 Node version: 10.16.0

Browser: Browser version: Firefox 74.0 (64-bit)

My email: [email protected]

ghost avatar Mar 30 '20 22:03 ghost

@dmcglochlin you can zip up the side file and attach that.

tourdedave avatar Apr 01 '20 07:04 tourdedave

Thanks for the suggestion to zip the .side file and send it.

ghost avatar Apr 01 '20 23:04 ghost

I also have this issue! Thanks for sharing this @dmcglochlin and sharing your .side file. I would love for this to get fixed. I am running the following versions of software:

OS: Windows 10 Selenium IDE Version: 3.17.0 Chrome driver: 84.0.4147.30 Chrome: 84.0.4147.125 Selenium-side-runner: 3.17.0 Node: 12.18.3

Danc2050 avatar Aug 19 '20 16:08 Danc2050

I am also having a similar problem with IDE & selenium-side-runner: on Windows10 ElementClickInterceptedError: Element IDE = 3.17.0, Firefox = 81.0, geckodriver = 1.20.0, Selenium-side-runner: 3.17, node: 12.18.0

Same issue with chrome too... chromedriver: 85.0.1 2ndProject.zip

yongchoo avatar Sep 26 '20 11:09 yongchoo

After doing some more 'experiments' I was able to run selenium-side-runner by: option 1: manually changed setWindowSize in the .side file to the max for my screen (1936x1056) option 2: in the IDE, deleted any entries with "out-line-danger" for the .side test file, then saved this file So for my case, IDE generates additional 'test entries' which are not compatible with selenium-side-runner. Perhaps this will hep

yongchoo avatar Sep 26 '20 13:09 yongchoo

I forgot to mention that my test url was https://react-redux.realworld.io

yongchoo avatar Sep 26 '20 14:09 yongchoo

I also have experienced this or more problems. It appears that "wait for element visible" commands are ignored? I created a simple test, works fine in the IDE, exported it, but selenium-side-runner reports "Your test suite must contain at least one test." I edit the .side fail, plain as day there is a "tests" section in the json. Other people can take the .side files and run in Selenium IDE on other computers

I already was setting the window size to fit my computer. I don't see any entries about "out-line-danger" .. whatever that is.

Is this tool supposed to work with any tests created in Selenium IDE Chrome extension?

Selenium Side Runner 3.17 Node 10 Chrome 87 Whatever version of chromedriver which came automatically running this command: npm install -g chromedriver

jackrabbithanna avatar Dec 09 '20 20:12 jackrabbithanna

Same issue. Happy to provide testfiles if needed.

florian-asche avatar Feb 25 '21 02:02 florian-asche

I'm having the same problem.

My tests run fine in Chrome, but fail in the Command Line (via Jenkins):

TimeoutError: Waiting for element to be located By(link text, linkName) Wait timed out after 15151ms

I've even tried adding pauses (even though it's bad practice!), refreshing the page, etc, but the element still isn't found.

slovatt avatar Mar 18 '21 09:03 slovatt

This is affecting our use of Selenium IDE as well.

Is there any ETA on a fix for this?

djsunderland avatar Mar 18 '21 09:03 djsunderland

two years passed but side runner and Selenium IDE still incompatible.

I tried to wait before element present, wait before element visible, I added pause after every step manually and still getting new errors. Even 5 steps can't be passed without debugging and manual script editing. It is easier and faster to create own test using usual programming language.

element is not attached to the page document, element not interactable, TimeoutError: Waiting for element to be located By(css selector, ...) and other endless errors.

Also tried to export test to pytest and it failing too:

actions.move_to_element(element, 0, 0).perform()
TypeError: ActionChains.move_to_element() takes 2 positional arguments but 4 were given

Completely not usable for automation tasks.

PS Of course script perfectly working inside Selenium IDE

5er9e1 avatar Mar 16 '22 04:03 5er9e1

@5er9e1 - Mid-April friend, please come back in April. This is where I'm working on v4, and I'm aiming to get a beta out then.

https://github.com/SeleniumHQ/selenium-ide/pull/1258

The things I don't have wired up yet are right click context menus, a fair amount of test coverage, and plugin architecture. Lots of little edge cases to fine tune too, but the core of what you're asking for is there.

If you don't care about those elements, feel free to check out the branch and use v4. The build commands are very simple:

yarn; yarn build; yarn start;

You'd be the third person to use it, but this gets about three hours a night from me. It will be ready soon 🙂

toddtarsi avatar Mar 16 '22 10:03 toddtarsi

Just also wanted to note, if you're cool with waiting until mid-April, those cases will be better handled and there will be a pre-built binary that you can just download and use, no build commands needed.

toddtarsi avatar Mar 16 '22 10:03 toddtarsi

I also have experienced this or more problems. It appears that "wait for element visible" commands are ignored? I created a simple test, works fine in the IDE, exported it, but selenium-side-runner reports "Your test suite must contain at least one test." I edit the .side fail, plain as day there is a "tests" section in the json. Other people can take the .side files and run in Selenium IDE on other computers

I already was setting the window size to fit my computer. I don't see any entries about "out-line-danger" .. whatever that is.

Is this tool supposed to work with any tests created in Selenium IDE Chrome extension?

Selenium Side Runner 3.17 Node 10 Chrome 87 Whatever version of chromedriver which came automatically running this command: npm install -g chromedriver

Been a while since I used Selenium IDE and found out that if you get this error while trying to run selenium-side-runner "Your test suite must contain at least one test." It might be because you haven't added your any of your Tests to the Test Suite in Selenium IDE.

image

Thadiusdog avatar Apr 01 '22 21:04 Thadiusdog

hello @toddtarsi i just wanted to say, that right click we implemented this way: execute script command with

const el = document.querySelector('CSS_SELECTOR_GOES_HERE');

const eventContextMenu = new MouseEvent('contextmenu', {
    bubbles: true,
});

el.dispatchEvent(eventContextMenu);

it ties to this issue #754 https://github.com/SeleniumHQ/selenium-ide/issues/754#issuecomment-688308753

But the selenium-side-runner 3.17.0 is throwing this error: JavascriptError: javascript error: missing ) after argument list

I was not able to upgrade to v4 and i created a new task for it, becasue i am experiencing the same issue as in this thread. I do not want this to be fixed in 3.17.0, but you were saying that you have issues with the right click, so maybe it will get you on the right track.

karasma3 avatar Oct 07 '22 09:10 karasma3

@karasma3 - Thanks for the tip. There's some good bits we could use here in v4. In v4, if we do support right click, we'd listen for that event to hook the recorder, but we'd only instrument it using the context click command in ide and side-runner. Using emulated playback is a bad road to go down, and a tool in the selenium ecosystem shouldn't instrument things that way. It's not that complex a code change, but I'm so buried in personal life that getting the new command and recorder out of me in the near term is physically impossible.

toddtarsi avatar Oct 07 '22 12:10 toddtarsi

We had promises of this working mid-April last year - where we at team? 😬

ditorelo avatar Feb 03 '23 22:02 ditorelo

Have you tried with the alpha releases of v4 before posting your complaint? :)

diemol avatar Feb 03 '23 23:02 diemol

@ditorelo - Yep! You should find v4 to be pretty good. The side runner, although in alpha, is up to like version 38 in npm (4.0.0-alpha.38). There are still some little things that are fiddly. Also, here is a link to the selenium-ide v4 releases. https://github.com/SeleniumHQ/selenium-ide/releases

The IDE is up to alpha version 32. You're right, I could probably do that as a beta, but for that I'd need code signing certificates, and that's a whole thing. For now, if the alpha of v4 isn't right for you, I totally get it. But its decent enough, in my highly biased opinion.

toddtarsi avatar Feb 05 '23 22:02 toddtarsi

@toddtarsi Hi, issue is still seen in Selenium Side Runner. Tried in Windows 10 and 11. Many elements fail which can run successfully in IDE. Mainly consisting of react icons and buttons which open popups. Is there an update on this for Side Runner?

Xpath is for example: //div[@data-testid='place-of-performance']//button[@aria-label='Add icon']

and cmd logs:

element click intercepted: Element is not clickable at point (752, 998) (Session info: chrome=114.0.5735.91)

  at CommandNode.handleTransientError (node_modules/@seleniumhq/side-runtime/src/playback-tree/command-node.ts:191:17)
  at CommandNode.retryCommand (node_modules/@seleniumhq/side-runtime/src/playback-tree/command-node.ts:161:12)
  at CommandNode.execute (node_modules/@seleniumhq/side-runtime/src/playback-tree/command-node.ts:100:20)
  at Playback._executeCommand (node_modules/@seleniumhq/side-runtime/src/playback.ts:559:22)
  at Playback._executionLoop (node_modules/@seleniumhq/side-runtime/src/playback.ts:436:18)
  at Playback._executionLoop (node_modules/@seleniumhq/side-runtime/src/playback.ts:493:14)

console.error element click intercepted: Element is not clickable at point (752, 858). Other element would receive the click:

...
(Session info: chrome=114.0.5735.91)
  at CommandNode.handleTransientError (node_modules/@seleniumhq/side-runtime/src/playback-tree/command-node.ts:191:17)
  at CommandNode.retryCommand (node_modules/@seleniumhq/side-runtime/src/playback-tree/command-node.ts:161:12)
  at CommandNode.execute (node_modules/@seleniumhq/side-runtime/src/playback-tree/command-node.ts:100:20)
  at Playback._executeCommand (node_modules/@seleniumhq/side-runtime/src/playback.ts:559:22)
  at Playback._executionLoop (node_modules/@seleniumhq/side-runtime/src/playback.ts:436:18)
  at Playback._executionLoop (node_modules/@seleniumhq/side-runtime/src/playback.ts:493:14)

FotisZal avatar Jun 08 '23 14:06 FotisZal