BadMethodCallException with Selenium and PHPUnit - selenium

I keep getting this error with alot of methods I am trying to use, here are a couple of code examlpes:
$this->verifyTextPresent('Hello world');
//BadMethodCallException: The command 'verifyTextPresent' is not existent or not s
upported yet.
$this->assertEquals("197", $this->getText("xpath=(//div[#id='none']/div/table/tbody/tr/td[2]/span)[29]"));
//BadMethodCallException: The command 'getText' is not existent or not supported y
et.
$this->waitForPageToLoad("30000");
////BadMethodCallException: The command 'waitForPageToLoad' is not existent or not s
upported yet.
I am getting this error with alot of methods, and as far as i can see there is no problem with the code itself and my php version is up to date so it's nothing like that. anyone know anything about this?

getting the same problem man ...
I think there is a problem with selenium if you install it using pear. .
I tried re-installing the selenium and offered lord satan 5 pigs and 2 chicken..
still no good
now Im installing selium using composer... I'll let you know what happen..
Edit***
Turns out using using phpunit.phar is the right answr. So I updated my phpunit . removed pear installed phpunit . then updated my composer.json to install phpunit and selenium .

Related

"invalid version 0 on git_proxy_options" from libgit2: cause? fix? walk-around?

I'm getting this error "invalid version 0 on git_proxy_options" from libgit2. This did not happen until very recently (I have recompiled my code so it may be a version issue). I'm not using a proxy. Does anyone know anything about this? What causes this message? Is there anything I can do to stop the failure? Either a fix or or a work-around will do.
Specifically, I am using the Rust crate git2 version 0.13.23. I am doing a fetch that triggers the error. This is on Fedora 34 on x86_64. I have searched on this but there does not seem to be any matches that help.
git2 = {version="0.13.22", features = ["vendored-libgit2"]}
in Cargo.toml fixed the issue.
Interesting...
I had upgraded libgit2 to 1.3.0 from 1.1.1. That broke my existing cargo install, so I unpacked the previous libgit2.so.1.1 with a symlink to libgit2.so.1. That's when this error condition showed up. After thinking a bit I decided to symlink libgit2.so.1.3 to libgit2.so.1.1 and it built my new cargo version which linked to the new libgit2.so.1.3. Then I deleted my libgit2.so.1.1 stuff. Kinda weird, and usually you expect things not to work when it has been linked to a previous .so version.

Elm - Unable to find a set of packages that will work with your constraints

Getting this error with Elm. On a Mac with Elm 0.17. Any suggestions? I blew up the elm-stuff folder and tried again. Same thing. Can't seem to get rid of this. I am very new to elm.
$ elm-repl
---- elm repl 0.17.0 -----------------------------------------------------------
:help for help, :exit to exit, more at <https://github.com/elm-lang/elm-repl>
--------------------------------------------------------------------------------
> 2 + 2
Unable to find a set of packages that will work with your constraints.
There was an elm-package.json in the same folder. I had to blow it up as well and then the repl started working again. Hope this helps someone else.

Expected Safari data directory does not exist

Selenium 2.41,
Mac_OSX = 10.8.5,
Safari = 6.0.5
While launching Safari driver getting error message "The expected Safari data directory does not exist: /Users/null/Library/Safari"
After googling found out code in Safari extension classes is expecting System.getenv("USER"),
if (Platform.MAC.is(current)) {
return new File("/Users/" + System.getenv("USER"), "Library/Safari");
}
Configured .bash_profile and launchd.conf file, However this does not seem to fix the issue...
When i execute syso(System.getenv("USER"); in eclipse ide its still returning "null"
Could anyone please assist in resolving this issue
Thanks In advance
That'w weird, I'm on mac and in terminal:
echo $USER
gives my user.
According to http://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html the correct property for your question would be
System.getProperty("user.name")
Also have a look at System.getProperty("user.home") (but note it could get messy under Windows when using Java 7 or older).

casperjs.bat on windows fails with cannot find module cli.js error

I'm trying out casperJS to run some automated tests. On windows. I followed this installation guide but am stuck.
when I try to run a simple test from the command line like this:
casperjs.bat smoketest.js
I get the following error:
Error: Cannot find module 'C:/code/base/main/Shared/casperjs\modules\cli.js'
I checked, and the file cli.js does exist under the specified path.
I thought the problem could be the mixture of forward and backward slashes in the path, but I edited the bootstrap.js casper code to hard code the path and it made no difference - it still the cannot find module.
I'm have tried this using phantomJS version 1.9.0, and 1.8.2.
Anyone know what I am doing wrong?
Has anyone had success running casper on Windows?
This is due to a bug in PhantomJS 1.9.0 that does not allow for absolute path loading in Windows. Afaik, this should only be apparent if you are using a master build of CasperJS (v1.1).
This bug has been fixed, but is not yet in the Windows binary. You can compile it yourself if you'd like, but that can take quite a bit of time.
I was using the master build of casper. With the latest released version, 1.0.2, it works fine.

Problems w/ OpenJML Update Site

When I try to install the openJML plugin from the update site at http://jmlspecs.sourceforge.net/openjml-updatesite I get the following error:
An error occurred while collecting items to be installed
session context was:(profile=epp.package.java, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
Artifact not found: ... (with about 4 or 5 jars)
I've tried installing previous versions of the plugin, but all result in similar "Artifact not found" errors. Anyone have any idea why this isn't working? Or have a workaround I could use to get the Eclipse plugin to work?
Thanks in advance!
A bug report has already been opened, but no one seems to care (yet):
http://sourceforge.net/p/jmlspecs/bugs/397/
Seems that you have to compile your own version of it.