azawawi / raku-selenium-webdriver Goto Github PK
View Code? Open in Web Editor NEWRaku bindings for Selenium WebDriver
License: MIT License
Raku bindings for Selenium WebDriver
License: MIT License
Refactor
$driver.find-element-by-id("username")
into
$driver.element-by-id( 'username' )
Please see chat transcript on#perl6
[16:49] <azawawi> my $username-element = $driver.find-element-by-id("username") # any ideas how to make it more Perl6ish?
[16:50] <[Coke]> azawawi: that line seems fine to me.
[16:51] <PerlJam> azawawi: $driver.find-element("username", :by<id>); # maybe more 6y along a certain dimension
[16:51] <azawawi> i was also thinking $driver.element( :id('username') ) # more jQuery-like
[16:52] <PerlJam> aye, that one is nice too
[16:52] <azawawi> or .element-by(...) that is
16:53] <nine> .element-by-id would be my choice, since it not only finds the element, it also returns it. And by-id is a bit of a special case, because there may only be one element with a given id.
[16:53] <nine> Other find-* methods have to deal with multiple results.
[16:54] <PerlJam> 1 is just a special case of many :)
[16:54] <nine> Good rule of thumb: a method should do one and only one thing
[16:54] <azawawi> nine: also auto-completion friendly
Please see the screenshot given after submit
https://github.com/azawawi/perl6-selenium-webdriver/blob/master/examples/ex02.t#L27.
The screenshot should be for "Perl 6" but somehow submit
is not waiting for page load as in the case of the phantom example.
Update with all the methods in updated version
Seems like firefox is not in the PATH at all
When trying to use Selenium::WebDriver::Firefox
, the following error occurs:
No such method 'unzip' for invocant of type 'File::Zip'
Seemingly there is another module with the exact same name as the File::Zip
you have authored (see here). I think since it is more recently updated than your module, zef favours it when installing dependencies. The other module with the same name has no unzip
method; it instead uses extract
.
To address this, I was able to install your module directly by using the command:
zef -v install https://github.com/azawawi/perl6-file-zip.git
Please see JSON Wire Protocol.
This Project website is now online using the default theme.
It should contain programmer-friendly content like Selenium Python Bindings website.
hi
i got this warning on brew install phantomjs
...
phantomjs has been officially discontinued upstream.
It may stop working correctly (or at all) in recent versions of macOS.
Creating tests as an example for doc.perl6.org will serve as a way in the future to prevent website functionality regressions.
Looks like its not working for last chrome, any plans to update this project ?
[17:00] <+yoleaux> 29 Oct 2015 15:38Z <pippo> azawawi: Is there a way to tell Selenium::Webdriver::Firefox not to look for the prefs.json in the subdir it is executed from?
D:> perl6 chrome.t
1..5
Starting ChromeDriver 2.19.346078 (6f1f0cde889532d48ce8242342d0b84f94b114a1) on port 49329
Only local connections are allowed.
not ok 1 - Google in title
# Failed test 'Google in title'
# at chrome.t line 16
not ok 2 - google.com in url
# Failed test 'google.com in url'
# at chrome.t line 17
# WebDriver cleanup
Type check failed in assignment to $!id; expected Str but got Any in method throw at C:\rakudo/share/perl6/runtime/CORE.setting.moarvm:1 in method _element at C:\rakudo\share\perl6\site\lib\Selenium\WebDriver\Wire.pm6:385
in method element-by-name at C:\rakudo\share\perl6\site\lib\Selenium\WebDriver\Wire.pm6:411
in block <unit> at chrome.t:20
# Looks like you planned 5 tests, but ran 2
# Looks like you failed 2 tests of 2
<nine> Phantomjs was not yet usable when I started WWW::WebKit. Also I needed a real drop-in replacement for Test::WWW::Selenium::Catalyst because we already had loads of tests based on that.
<azawawi> so basically i need to make sure my selenium package has a compatibility layer with Test::WWW::Selenium to make it easier to migrate Perl into Perl 6 code
https://metacpan.org/source/MATTP/Test-WWW-Selenium-1.36/lib/Test/WWW/Selenium.pm
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.