ChromeDriver and Chrome Browser out of sync - webdriver

Recently Chrome got updated to version 79. I've updated chromedriver to the respective version same way as I always do - inside my java project. But when I deploy Zalenium, in containers, inside home/seluser/ there's still chromedriver-78. I've tried deleting that old chromedriver with 'kubectl rm chromedriver' - file is getting deleted bu I'm not able to run any tests. I've tried redeploying Zalenium and no luck. Everything is timestamped with the latest date except the chromedriver file. Never had this issue in the past of course.
How do I update chromedriver so that is updated across all containers?
How does Zalenium control/handle Chrome browser updates?
Here's the chromedriver insde a container whenever I use 'Interact via VNC':
Here's the code snippet with how I handle accessing the chromedriver:
public static MutableCapabilities getChromeCapability() {
String chromePath = prop_conf_browsers.getProperty("chromePath");
String chromeDriverPath = prop_conf_browsers.getProperty("chromeDriverPath");
System.out.println(chromeDriverPath);
String chromeProfileDir = prop_conf_browsers.getProperty("chromeProfileDir");
if (chromePath != null && !chromePath.equalsIgnoreCase("default") && !chromePath.equalsIgnoreCase("")) {
System.setProperty("webdriver.chrome.bin", chromePath);
}
if (chromeDriverPath != null && !chromeDriverPath.equalsIgnoreCase("default")
&& !chromeDriverPath.equalsIgnoreCase("")) {
System.setProperty("webdriver.chrome.driver", chromeDriverPath);
}
Environment info:
capabilities: Capabilities {acceptSslCerts: true, browserName: chrome, maxInstances: 1, platform: LINUX, platformName: LINUX, resolution: 1920x1080, screen-resolution: 1920x1080, screenResolution: 1920x1080, seleniumProtocol: WebDriver, server:CONFIG_UUID: 456a4fcc-xxxx-xxxx-xxxx-xxx..., tz: America/Chicago, version: 79.0.3945.79}

You do not need to configure ChromeDriver in you Java project, the docker containers already have all this configured.

Related

Sudden syntax error after deployment

I have a working symfony project. I have it on a private bitbucked repository and locally the website works without an issue.
Today I tried to deploy the project onto an external server linuxpl.com.
Steps taken include:
Istalling composer
Adding the mysql database
Running git clone to get the data into a proper location
Running composer install on the folder to install everything and connect to the db
Cleared the cache
Set the project root as ....domain/project_name/web
However after completing all these steps, when running the website with regular server:run I'm getting this odd error:
Parse error: syntax error, unexpected '.' in /home/spirifer/domains/surowcewobiektywie.pl/konkurs/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1571
Not sure if this is of any importance but the mentioned code partion looks like this in my local files:
// Some objects throw exceptions when they have __call, and the method we try
// to call is not supported. If ignoreStrictCheck is true, we should return null.
try {
$ret = $object->$method(...$arguments);
} catch (BadMethodCallException $e) {
if ($call && ($ignoreStrictCheck || !$env->isStrictVariables())) {
return;
}
throw $e;
}
The local version does not differ from the one on the server.
My local machine has PHP 7.0.9 and the remove server has PHP 7.0.14
How could I fix this issue?
PHP 5.6 adds Variadic functions, with "...". However, Twig v1.x only required the use of PHP 5.2.7 or above.
If you didn't explicitly update to Twig 2.0, it's very possible you have used the 'death star' version constraint in the composer file - '*'. which allows uncontrolled version updates to the latest version. If this is the case, you will need to either update your version of PHP, or at least require just a previous version of Twig/twig, "^1.32" would be the latest in the version 1 series of Twig.

When i used webdriver sampler in jmeter for this code,i got blank window

When i used webdriver sampler in jmeter for this code,i got blank window,Please give me the solution
var pkg = JavaImporter(org.openqa.selenium)
var support_ui = JavaImporter(org.openqa.selenium.support.ui.WebDriverWait)
var wait = new support_ui.WebDriverWait(WDS.browser, 5000)
WDS.sampleResult.sampleStart()
WDS.browser.get('http://duckduckgo.com')
var searchField = WDS.browser.findElement(pkg.By.id('search_form_input_homepage'))
searchField.click()
searchField.sendKeys(['blazemeter'])
var button = WDS.browser.findElement(pkg.By.id('search_button_homepage'))
button.click()
var link = WDS.browser.findElement(pkg.By.ByCssSelector('#r1-0 > div.links_main > h2 > a.large > b'))
link.click()
WDS.log.info(WDS.name + ' has logged an entry');
WDS.sampleResult.sampleEnd()
If you experience any problems with JMeter the first place to look for the cause is jmeter.log file which usually lives under /bin folder of your JMeter installation.
The most frequent problem is Firefox and Selenium libraries mismatch as Firefox is being updated more frequently and Selenium support is few versions behind.
In order to determine supported version:
Determine underlying Selenium version by looking for "selenium-*" files under /lib folder of your JMeter installation. For instance latest WebDriver plugins come with Selenium 2.46.0
Look into Selenium Java changelog and see supported Firefox version.
Download supported Firefox version from Mozilla FTP website and install it somewhere.
Edit system.properties file (lives under /bin folder of your JMeter installation) and add the following line there:
webdriver.firefox.bin=/path/to/firefox/executable
Restart JMeter - everything should be working fine.
See The WebDriver Sampler: Your Top 10 Questions Answered guide for more WebDriver Sampler tips and tricks

Cordova CLI 5.0.0 - JavaScript error BlankCordovaApp

I am using the JavaScript Blank Apache Cordova App. Changes were made to the config.xml only.
I changed the Cordova CLI in config.xml from 4.3.0 to 5.0.0. NPM downloaded the files, and no errors were reported.
When I F5 Debug > Android > Ripple. I get the following:
"Exception occurred". Uncaught Error: cordova already defined
This error does not appear when running 4.3.0. Any thoughts on why is would happen in 5.0.0?
Unfortunately this is a known issue with Ripple and the Android implementation in Cordova 5.0.0. The next point release will resolve it as the fix has been merged.
See the following dev mailing list thread on Cordova for details if you are interested: http://callback.markmail.org/message/so6xavs6xdfn45zv?q=+list:org%2Eapache%2Eincubator%2Ecallback-dev+Ripple
UPDATE: Cordova 5.1.1 is out and resolves this problem along with an Android security issue.
A bit late, but this usually works for me. For testing purposes (not only this case, but most of errors that sometimes occur in ripple) I always give it a first try, just like:
---->line 104 on cordova.js (which you can find inside platform www)
replace
if ("cordova" in window) { throw new Error("cordova already defined"); };
With:
if ("cordova" in window) {
//check if emulation
if(window.location.href.indexOf('localhost:4400') < 0){
//if not emulating, throw error
throw new Error("cordova already defined");
}
};
If it doesn't work, then I start googling about the issue.
hope this helps somebody to save some time.

Velocity hangs with no errors when testing meteor app

I'm pretty new to meteor so I'm just writing a simple app but really want to make it as TDD as possible (worth mentioning I'm also new to Mocha). So I've added the mike:mocha and velocity:core packages and written a super simple initial test just to see if I can get things to work, which I've added at tests/mocha/client/tests.js:
if (typeof MochaWeb != 'undefined') {
MochaWeb.testOnly(function () {
describe('Friends are added successfully', function () {
it('Should add a new person to the Friend collection', function(done) {
var friendId = Friends.insert(
{ firstName: 'New',
lastName: 'Friend'});
var friend = Friends.findOne({'firstName':'New'});
console.log(friend);
chai.assert.equal(friend.length === 1);
done();
});
});
})
;}
My problem is that when I run either the meteor command or meteor --test, I get nothing in the terminal apart from the expected:
=> Started proxy.
=> Started MongoDB.I20150115-22:31:03.216(0)? [velocity] chokadir watching /correctDirectory/tests
=> Started your app.
=> App running at: http://localhost:3000/
But then Velocity just hangs (a blue circle with a wider blue ring around it - no greens or red), pulsating and not providing any feedback whatsoever. None on the developer console or the terminal either! I tried checking localhost:5000 but this comes back as 'not available'.
Not sure how to start with figuring this one out!
Thanks in advance to anyone who can help :)
I was able to get your example to work on my local, so I would recommend checking versions of your software and get that in line first.
Here are a few things you can check, but I'll show what's on my machine for comparison:
Check your version of node
node -v
v0.10.35
If necessary, upgrade node. On my mac, I do the following:
brew update && brew upgrade node
If you don't have a mac, you might want to google for upgrade instructions for your machine's platform.
Check your package versions
meteor list
meteor-platform 1.2.1
mike:mocha 0.5.1
velocity:core 0.4.5
Check your meteor version
meteor --version
Meteor 1.0.2.1
If necessary, upgrade meteor and related packages
meteor update
If none of that helps, please post additional information. Additionally, you can also create an issue on Github for Velocity.

Aptana Javascript code assist

OS: Ubuntu 11.04 64bit
Application: Aptana 3.05
Java: java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.2) (6b22-1.10.2-0ubuntu1~11.04.1)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
Hi! I'm new to programming, so I decided to not post it as a bug, because I think that should be an easy solution to these problems.
After upgrading to Aptana 3.05, I miss some features and I noticed some strange behaviour.
HTML Files Template removed
I accidentally fix it when I opened command>HTML>Edit this bundle, than I saved and the application crushed. At restart I had all HTML files template.
A new folder was created Aptana%20Rubles/html.ruble
Javascript Code Assistent
It worked so well before updating! now it getting lazy, and seems to have forgot some common methods.
function searchList () {
var txt = document.getElementById("search").value;
if(!txt){
alert("Invalid Input");
document.getElementById("search").focus();
return false;
}
}
document.ge...
For instance, the only proposal for the last line is "getElementById"(eg. no -"getElementByTagName")
How can I install or restore a more "basic" javascript assistent?
Even some useful scripts don't work as before. Function in javascript should focus on the function's name, then the function's arguments and finally the body. Instead it skip to the function body after the name.
Do you think a new fresh installation of Aptana 3.05 will fix these issues?
If it won't I rather downgrade.

Resources