seasidest / parasol Goto Github PK
View Code? Open in Web Editor NEWTesting web apps in Smalltalk using Selenium WebDriver.
License: MIT License
Testing web apps in Smalltalk using Selenium WebDriver.
License: MIT License
In both Pharo 5 & 6.1 on Mac os x 10.36.6 I followed the instructions in the Readme and keep hitting the error in the subject. I have a fix here in a sec but the Session Id code from the 301/302 redirect wasn't working.
The response that causes the error has no body but the headers are:
a ZnHeaders('Cache-Control'->'no-cache' 'Connection'->'close' 'Date'->'Thu, 12 Jul 2018 18:22:01 GMT' 'Expires'->'Thu, 01 Jan 1970 00:00:00 GMT' 'Location'->'http://127.0.0.1:4444/wd/hub/session/1531355270093' 'Server'->'Jetty/5.1.x (Mac OS X/10.13.6 x86_64 java/1.8.0_31' )
The chromedriver version is 2.40.565386
The selenium standalone driver is selenium-server-standalone-3.13.0.jar
Hi
When trying to load seaside v3.4.7 and parasol I got an endless loop.
I do not really get why in addition the system forces to load Ston and zinc because they are already in the system.
The class BPWebDriverTestCase
caches and reuses BPRemoteWebDriver
instances between tests, to prevent having to start the browser for every test. But the caching mechanism doesn't reset cookies, so they carry over from one test to another. The cookies should be cleared (or drivers in which cookies have been set should not be reused).
I got a problem because the dev toolbar of Seaside caught an event of an element behind it. Would be cool to disable it for the test app.
The Parasol self-tests sometimes suffer from “random” failures. For example, Travis build #58 had one failed test, while the next build had no failing tests (all that changed was the README file).
This particular problem has been fixed with Metacello/metacello#531, presumably Squeak-5.2 is not loading the latest version of Metacello when loading this project ... when and if the Squeak-5.2 image is updated to include the latest Metacello/Metacello commit, the test should start passing again ... see also SeasideSt/Seaside#1229, where Squeak-5.2 was added to the expected failure list - not sure whether Squeak-5.2 is being maintained for Seaside or not
Chromedriver 75 runs in W3C compatibility mode by default [1]. The W3C version protocol of webdriver [2] is not yet implemented in Parasol. The tests should put the 'w3c' chromeoption to false, as long as this protocol is not implemented.
[1] https://chromedriver.storage.googleapis.com/75.0.3770.8/notes.txt
[2] https://www.w3.org/TR/webdriver1/
See test output for job 372.1: when sending #getCapabilities
a BPUnsupportedCommandException
is signaled when using selenium v3.6.0.
Loading Parasol in Squeak v5.2 fails, with an error stating:
Error: This package must not be used. It was split in 2015 into: WebClient-Seaside-Adatpor and WebClient-Seaside-Tools-Development
See: https://travis-ci.org/SeasideSt/Parasol/jobs/466712494#L757
Running with selenium-server-standalone-3.141.59 and geckodriver-v0.23.0 any attempt to find an element results in the above exception.
I see from the W3 WebDriver spec that:
The web element identifier is the string constant "element-6066-11e4-a52e-4f735466cecf".
Which seems indeed to be what is returned in these cases, yet there are several methods that check for the string 'ELEMENT' instead.
Pharo5.0 (Latest update: #50761)
Metacello new
baseline: 'Parasol';
repository: 'github://SeasideSt/Parasol/repository';
load: 'tests'.
Parasol-Convenience (ThomasCleenewerck.16)
Parasol-Core (JohanBrichau.62)
Parasol-Pharo (JohanBrichau.13)
Parasol-Tests (JohanBrichau.34)
BPMiscTestCase debug: #'testPlatformIs'.
POST /session/56...73/keys did not match a known command
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:48:19 -0700'
System info: host: '...', ip: '...', os.name: 'Windows 7', os.arch: 'x86', os.version: '6.1', java.version: '1.8.0_111'
Driver info: org.openqa.selenium.firefox.FirefoxDriver
Capabilities [{rotatable=false, raisesAccessibilityExceptions=false, firefoxOptions={args=[], profile=...=}, appBuildId=20161129173726, version=50.0.2, platform=XP, proxy={}, command_id=1, specificationLevel=0, acceptSslCerts=false, processId=2648, browserVersion=50.0.2, platformVersion=6.1, XULappId={...}, browserName=firefox, takesScreenshot=true, takesElementScreenshot=true, platformName=windows_nt}]
Session ID: 56...73
I see this command in https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol but not in https://www.w3.org/TR/webdriver/. Perhaps we should use https://www.w3.org/TR/webdriver/#element-send-keys.
Testing fails on Pharo 5, see: https://travis-ci.org/SeasideSt/Parasol/jobs/550959588#L993
The whole job fails, without a test report.
For example I want to test a paginated table.
In a first test I would like to test the table with few data to get only one page.
In the second test I would like to test the table with multiple pages.
Parasol is affected by a bug introduced in chromedriver 91.0.4472.19 :https://bugs.chromium.org/p/chromium/issues/detail?id=1205107
Although the issue is reportedly fixed in chromedriver 91.0.4472.101, the getAttribute:
method still returns nil when trying to retrieve the value
of an input field.
More context: https://janmolak.com/chrome-91-might-break-your-tests-507309b9b2cd
OS: MacOS
Pharo version: Pharo5.0 Latest update: #50772
Chrome version: Version 76.0.3809.87 (Official Build) (64-bit)
Chrome Driver version: ChromeDriver 76.0.3809.68
Problem:
When running the Wikipedia example code, it fails at the following line :-
(driver findElementByID: 'searchInput') click.
Error Message: "KeyNotFound: key 'ELEMENT' not found in Dictionary
The automated tests are currently not run for VisualWorks. I'm not sure whether Parasol still works on VisualWorks or not. I'm not aware of anyone actively using Parasol on VisualWorks.
I don't think smalltalkCI has support for VisualWorks.
Perhaps we should just remove support for VisualWorks (unless someone who wants to maintain the VisualWorks-support package speaks up).
See Travis CI job 248.5 for Squeak-4.6: loading failed on “Error: Name not found: Grease-Core”. The same error seems to have occurred in all builds since build 244. In job 243.4, the tests were still run.
Hi,
I have see two interesting functions :
BPSeasideWebDriverTestCase >> waitUntil:checkEvery:timeoutAfter:
BPSeasideWebDriverTestCase >> waitUntil:checkEvery:timeoutAfter:with:
Why don't move this on parent BPSeasideWebDriverTestCase ?
There is definitely a Metacello project dependency loop between Seaside and Parasol ... Metacello checks for package dependency loops and not out and out project dependency loops --- a deficiency in Metatacello, but Metacello would simply produce an error, much better than infinite loop, but at the end of the day the loop must be broken ... for the purposes of this bug, I will fix the baseline and remove the Parasol to Seaside project dependency for GemStone only - since it is sufficient that Seaside loads Parasol.
There's some code in the method BPPharoPlatform>>#handleRequest:
to strip trailing NULL characters from the response:
Either that can be removed, or it should be re-enabled again. Based on the change done in 83ad7f2, I would say it might still be necessary.
Some of the comments in methods that refer to the documentation of the corresponding Java API method use the old website, for example:
Fixing this seems to be just be a matter of replacing http://selenium.googlecode.com/svn/trunk/
by https://seleniumhq.github.io/selenium/
, and replacing (
and )
by -
. For the above example, the new URL is:
The “repository” directory (still) uses metadata files. Even when using GitFileTree-MergeDriver, this can cause merging problems. Plus the MergeDriver is, presumably, not used when merging on the GitHub website.
We should probably adopt the metadata-less option that was introduced a while ago.
The cause is this bug: https://bugs.chromium.org/p/chromium/issues/detail?id=880631&q=headless%20about&colspec=ID%20Pri%20M%20Stars%20ReleaseBlock%20Component%20Status%20Owner%20Summary%20OS%20Modified
Parasol accesses the about:
page in the teardown of every test. Hence, we timeout on every test.
Loading Parasol fails, see the Travis build logs for more details, the error is:
MetacelloConflictingProjectError: Load Conflict between existing BaselineOfZincHTTPComponents [baseline] from github://svenvc/zinc:master/repository and ConfigurationOfZincHTTPComponents stable from http://mc.stfx.eu/ZincHTTPComponents
Hi,
I have tried to manually set the default download path for chrome using a DesiredCapabilities object:
desiredDriverBrowserCapabilities
^ BPDesiredCapabilities chrome
" setCapability: 'chromeOptions' << also tried this"
setCapability: 'goog:chromeOptions'
to:
(Dictionary new
at: 'prefs'
put:
(Dictionary new
at: 'download.default_directory'
put: '/tmp/testdownloads';
at: 'download.prompt_for_download'
put: false;
at: 'download.directory_upgrade'
put: true;
yourself);
yourself);
yourself
I could not get that to work. I suspect there are a lot of things related to the internals of WebDriver and chromedriver that I'd have to understand better.
If you trawl the web on the topic, you find a lot of references for setting this using the ChromeOptions object .
It would be super if such an object was available in Parasol or even if there was a bit of documentation for how to get this task done with what is available at present.
It seems that at a minimum, the method CharacterCollection>>substrings: seems to be defined in 3 packages: Grease-GemStone-Core and Parasol-GemStone:
==================== Parasol-GemStone (-) --> image (+) ====================
Item was removed:
- ----- Method: CharacterCollection>>substrings: (in category '*Parasol-GemStone') -----substrings: separators
- ^ self subStrings: separators!
So not needed in Parasol ... may not be strictly related to 3.6.0, but I'm not finished yet:)
The test BPRemoteWebDriverTestCase>>#testCookies
fails in Squeak:
https://travis-ci.org/SeasideSt/Parasol/jobs/550887953#L1139
Since there is some random failure with tests it would be nice to let the user define a number of retry when a test fail. By default it would be 0 retry but the user could add a method numberOfRetry
in his test class to enable it. Thus the CI would not fail randomly often.
I would like have other opinions about that.
I load in my baseline Parasol, voyage, mdl (and other stuff).
I have noticed that I have to load mdl and voyage before parasol to avoid getting an endless loop
could be related with (but I do NOT use GemStone):
#43
I can fix the problem by changing order but I want to report it here.
With the following baseline the endless loop can be reproduced:
baseline: spec
<baseline>
spec
for: #common
do: [ spec blessing: #baseline.
spec
baseline: 'Parasol'
with: [ spec
loads: #('core');
repository: 'github://SeasideSt/Parasol/repository' ].
spec
baseline: 'MaterialDesignLite'
with: [ spec repository: 'github://DuneSt/MaterialDesignLite:v2.2.4/src' ] ]
Newer versions of chromedriver seem to be pegged to specific Chrome versions. While v2.41 of chromedriver seems to allow using Chrome 75.0.3770.100; the newer v2.45 refuses to create a session, returning an error instead saying “Chrome version must be between 70 and 73”.
Implication: we may need to update chromedriver more often, or specify the version of Chrome to use in the “.travis.yml” file as well.
Feature request (Johan here, writing with Koen's account)
Scenario: running Seaside tests that perform jQuery ajax requests require to wait until the browser's running XMLHttpRequests are done. Having native support for this in Parasol would be helpful.
Using Selenium 4, the error message that is returned may follow a different format than the W3C protocol. For example, the following can be returned when trying to delete a session that was already closed:
{
"value": "\u002fsession\u002fc8f703018cf377e41f5a94584d3e4bab",
"message": "Unable to execute request for an existing session: Unable to find session with ID: c8f703018cf377e41f5a94584d3e4bab\nBuild info: version: '4.1.2', revision: '9a5a329c5a'\n ......",
"error": "org.openqa.selenium.NoSuchSessionException"
}
In W3C spec, the 'error' and 'message' attributes should have been nested inside the 'value' attribute. (see https://www.w3.org/TR/webdriver/#errors).
Since this crashes the error handling, a workaround in Parasol is needed. It is unclear to me why it occurs for now.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.