w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to run selenium standalone server as hub using apache commons exec?
I solved the problem by using shell file. I wrote the command to start the selenium hub in .sh file. Then I did below stuff: String cmd = "bash"; CommandLine cmdLine = new CommandLine(cmd); cmdLine.addArgument("./src/main/resources/scripts/hub_start.sh"); cmdLine.addArgument(portNumber); executor.execute(cmdLine); Thus, I was able to execute the shell file and started selenium-hub.

Categories : Java

Selenium standalone starts Firefox, which stays blank
I had a similar problem: my test opened Firefox window, but nothing actually happened (it stayed blank for some time). I had this error: org.openqa.selenium.WebDriverException: Unable to bind to locking port 7054 within 45000 ms Solution: Try to download and include in your project the latest version of Selenium driver. It helped me and now I can execute all my tests - works fine with the latest firefox (33.0) and Selenium driver for java in version 2.43.1 (I had problems with version 2.42.x).

Categories : Java

create a standalone py server application for mac
you can use pyinstaller, I've used it with windows and it works perfectly. also is you compare other tools like this, pyinstaller is the best because it gives you the ability to create just a single installer instead of a package.

Categories : Python

Cannot Access Database Created with Neo4j Embedded Server on Neo4j Standalone Server
I suspect the problem is an issue with relative/absolute paths, meaning you might think it points to the right directory but actually it created an empty database somewhere else. If that's the case, just change your directory settings. As a temporary fix, you can always keep the default settings and just copy your embedded db into the data/graph.db folder. That always works for me. Checking your path, the thing you need to look for is a leading slash. A leading slash indicates an absolute path, whereas the lack of one indicates a path relative to the main server directory which is the directory that contains conf, bin, data, ... Also, if you typed in the line yourself, check for typos. The correct syntax is: org.neo4j.server.database.location=/this/is/an/absolute/path or else this : o

Categories : Ruby

What is the best way to deploy to a standalone Weblogic Server ADF Secure Application with maven
Which version are you using, because if you are using 12c it should come out of the box with JDeveloper! Or else try to use OEPE(Oracle Enterprise Pack for Eclipse) as it packages the application without OJDeploy, you can use that and create your Maven script to take the generated war file and resume from there.

Categories : Java

How can I create/install a SSL Cert for a standalone Datasnap Rest Server on local network
First purchase an SSL certificate from a provider such as GoDaddy or RapidSSL. When purchasing you specify the domain name that the certificate will represent. Obviously you can point the domain name to any IP address you wish by configuring the DNS entries for your domain. I've never configured a certificate to point to an actual IP address but I guess it's possible. Given you want to have your server accept requests from the internet, I would use a domain name so that you can change the IP address if required. When purchasing your SSL certificate, you will need to provide a Certificate Signing Request (CSR) which you generate on your server computer, specifying the domain name you want to use the SSL certificate for. You can use a utility such as the DigiCert util (www.digicert.com

Categories : Delphi

Saving Images to a docx file using AS3 or JavaScript for a flex standalone web based app. (No back end server)
DocxGenJS might be good for you (I'm the creator of DocxGen) Demo Demo: Image Replacing GitHubRepo It works only on FF3+ and Chrome, not IE. You could port it to Flex to make a IE compatible version (IE doesn't work because the reading of documents in Ajax with DataBytes isn't well supported)

Categories : Javascript

Selenium server start within .NET
I can start sever with this command "java -jar selenium-server-standalone-2.33.0.jar -trustAllSSLCertificates" from command line and C# code. Server starting well i can create driver and can see the page source . IWebDriver driver = new RemoteWebDriver(new System.Uri("http://loclhost:4444/wd/hub"), DesiredCapabilities.Opera()); driver.Navigate().GoToUrl(url); driver.Manage().Timeouts().SetPageLoadTimeout(TimeSpan.FromSeconds(100)); But when i want to reach WebElement through this code element throws lots of exception ('element.Displayed' threw an exception of type 'System.InvalidOperationException') IWebElement element; // FindElement(driver, "txtUserName", 100); element = driver.FindElement(By.Id("txtUserName")); string name = element.GetAttribute("Name");

Categories : C#

Running selenium behind a proxy server
You need to set desired capabilities or browser profile, like this: profile = webdriver.FirefoxProfile() profile.set_preference("network.proxy.type", 1) profile.set_preference("network.proxy.http", "proxy.server.address") profile.set_preference("network.proxy.http_port", "port_number") profile.update_preferences() driver = webdriver.Firefox(firefox_profile=profile) Also see related threads: how do i set proxy for chrome in python webdriver Selenium using Python: enter/provide http proxy password for firefox Running Selenium Webdriver with a proxy in Python http://krosinski.blogspot.ru/2012/11/selenium-firefox-webdriver-and-proxies.html

Categories : Python

PHPUNIT running on selenium server
If you extend PHPUnit_Extensions_Selenium2TestCase, you can count elements with this structure: $elements = $this->elements($this->using('xpath')->value('//li')); $this->assertEquals(3, count($elements));

Categories : PHP

Running Selenium Java Code on Server
Once you have downloaded selenium-server-standalone-{VERSION}. jar place it on the computer with the browser you want to test. Then from the directory with the jar run the following java -jar selenium-server-standalone-{VERSION}.jar Then create a driver object that connects to the Remote Webdriver server. This driver object can drive any operation similar ways on the remote server as you have been using driver object in your system. try{ if ( browser.startsWith("IE")) driver = new RemoteWebDriver(new URL("http://" + hostname + ":" + port + "/wd/hub"), DesiredCapabilities.internetExplorer()); else if ( browser.startsWith("FF")) driver = new RemoteWebDriver(new URL("http://" + hostname + ":" + port + "/wd/hub"), DesiredCapabilities.firefox());

Categories : Java

Start Selenium Server with Firefox Portable
Point to the profile folder of the portable installation: (C:seleniumfirefox_portable-14.0.1Data) ie. C:seleniumserver>java -jar selenium-server.jar -firefoxProfileTemplate "C:seleniumfirefox_portable-14.0.1Data" Additional info here: http://portableapps.com/node/5376 NOTE: I had to close all Firefox windows before running the tests. Otherwise the latest version of Firefox is launched.

Categories : Firefox

issue in installing selenium-server-standale
Those are my 2 batch files (paste on different .bat files): HUB @echo off echo --- Starting Grid 2 HUB ... call java -jar selenium-server-standalone-2.32.0.jar -role hub WINDOWS NODE @echo off echo --- Starting Grid 2 NODE ... call java -jar selenium-server-standalone-2.32.0.jar -role wd -hub http://{LOCALHOST OR HUB IP}:4444/grid/register -maxSessions 1 Run both and it should be work at least on firefox. Hope it helps

Categories : Selenium

What can I do to speed up Behat tests on a Selenium CI server?
yes more memory need to be allocated and if possible, if possible set JVM related parameters while starting Jenkins like for garbage collection; http://www.oracle.com/technetwork/java/javase/tech/vmoptions-jsp-140102.html

Categories : PHP

How to run selenium server sessions on different xvfb screens?
With the selenium hub, you can add the browsers in separately in their own Xvfb sessions java -jar selenium-server-standalone-2.33.0.jar -role hub& then connect each browser separately in its own Xvfb session, DISPLAY and port export DISPLAY=:11 Xvfb :11 -screen 0 1024x768x16 & java -jar selenium-server-standalone-2.33.0.jar -role node -port 4441 -hub http://localhost:4444/grid/register -browser "browserName=firefox,version=19,maxInstances=5"&

Categories : Selenium

Could not contact Selenium Server; have you started it on 'localhost:4444'?
Try to add the below code to start the server. public void setUp() throws Exception { selenium = new DefaultSelenium("localhost", 4444, "*chrome", "http://www.google.com/"); selenium.start(); } Hope this will solve your problem.

Categories : Selenium

how do i disable javascript while running headless selenium server and using firefox?
in case of PhantomJs Headless Tesing you can do it like this public static void main(String[] argv) { // prepare capabilities Capabilities caps = new DesiredCapabilities(); ((DesiredCapabilities) caps).setJavascriptEnabled(false);//by default it was enabled ((DesiredCapabilities) caps).setCapability( PhantomJSDriverService.PHANTOMJS_EXECUTABLE_PATH_PROPERTY, "E:\browsers\phantomjs-1.8.2-windows\phantomjs.exe" ); WebDriver driver = new PhantomJSDriver(caps); driver.get("https://www.google.com"); } if you want to disable javascript in firefox programtically in selenium you can do it by creating profile FirefoxProfile profile = new FirefoxProfile(); profile .SetPreference("javascript.enabled", false); driver = new FirefoxDriver(profile );

Categories : PHP

get image frames webcam from server with selenium python script
First, what you'll need to do is navigate to the webpage with Selenium. Then, analyse the web page source HTML which the Javascript will have rendered by you navigating to the page, to get the image URL. You can do this with Selenium or with an HTML parser. Then you can easily download the image using wget or some other URL grabber. You might not even need Selenium to accomplish this if when you get the page, the image is already there. If that is the case you can just use the URL grabber to get the page directly. Let me know if you want more details or if you have any questions.

Categories : Python

Can Selenium be run on a server to automate tasks, or does it need a browser to run the task inside of
Selenium always need an instance of a browser to control. Luckily, there are browsers out there that aren't that heavy as the usual browsers you know. You don't have to open IE / Firefox / Chrome / Opera. You can use HtmlUnitDriver which controls HTMLUnit - a headless Java browser that does not have any UI. Or a PhantomJsDriver which drives PhantomJS - another headless browser running on WebKit. Those headless browsers are much less memory-heavy, usually are faster (since they don't have to render anything), they don't require a graphical interface to be available for the computer they run at and are therefore easily usable server-side.

Categories : Selenium

Django Jenkins raises WebDriverException when processed to Selenium server
I solved the problem this way (used a phantom-js instead of HTMLUNIT, because it's the only remaining stable version of code). from django.test import LiveServerTestCase from selenium import webdriver from os import environ class SeleniumTestCase(LiveServerTestCase): __test__ = False @classmethod def setUpClass(cls): environ['NO_PROXY'] = '127.0.0.1' # The key point cls.selenium = webdriver.PhantomJS(service_args=['--proxy-type=none']) super(SeleniumTestCase, cls).setUpClass() @classmethod def tearDownClass(cls): cls.selenium.close() cls.selenium.quit() super(SeleniumTestCase, cls).tearDownClass() class TestFoo(SeleniumTestCase): def setUp(self): # do something before every test method runs

Categories : Python

My current testcases are not working with new selenium 2.34.0 and php (edit added code and log file from selenium)
I'm not sure which library you're using for php-webdriver. From your code, I'm guessing Either Adam Goucher / Element-34 php-webdriver or an older version of the Facebook php-webdriver. It looks like there have been some changes in session handling for the WebDriver binaries, and those changes aren't reflected in the element-34 webdriver bindings yet. Where I'm using those, I've been able to patch the bindings just enough to get things working (This pull request looks like it's correcting the problem: https://github.com/Element-34/php-webdriver/pull/44). If you're using the Facebook bindings, they've recently been completely rewritten. Unfortunately, it probably means your tests are all broken until you update. The new facebook version works with WebDriver 2.34 for me here. See the

Categories : PHP

How to make selenium RC tests run in multiple browsers (using java & eclipse & selenium grid)
If selenium grid is already running, you're halfway done. As you might know, selenium grid automatically distributes the tests on all registered nodes. If only one browser is opening at a time, it probably means you're not executing your tests in parallel - they are probably executing sequentially. What you need to do now is to run your tests in parallel. If you are using maven, you could configure Maven Surefire Plugin to run the tests in multiple threads for you (works both with JUnit 4.7+ and TestNG): Using Maven: If you are using Maven, add the following snippet to your <plugins> section in your pom.xml (change it according to your needs - see doc). <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</arti

Categories : Java

How to change selenium user agent in selenium-webdriver nodejs land?
The answer is that it is impossible. https://code.google.com/p/selenium/issues/detail?id=6189

Categories : Javascript

Selenium web driver error of Uninitialized constant Selenium::Webdriver
Try this out : driver = Selenium::WebDriver.for :firefox source

Categories : Ruby

selenium.getText finds element but selenium.click does not
You are really want to use Selenium 2 (aka Web Driver), it's much more faster and reliable. So forget about Selenium 1 unless you have a really good reason to use it. Your code should look like this WebDriver driver = new FirefoxDriver(); //or any other, like ChromeDriver or OperaDriver WebElement element = driver.findElement(By.id("idOfYourElement"); element.click(); String text = element.getText(); Also see the 5 minute getting started guide

Categories : Java

Export WebDriver Code - Selenium IDE vs Selenium Builder
The following words are my opinion and I don't want to hurt someone's feelings but Selenium IDE (or Builder) should be mostly used as a 'helper' in your testing activities. To rely for code or execution on such (capture-replay) tool is not serious. Why!? First it's poor maintainability and repeating code. Next is a need of some additional language (JS) support for even most simple operations. If you think twice - you'll see that WebDriver or Selenium 2.0 is way better solution. Yes- you can export code, but like you said the result is not very good. I agree that you can reuse this auto-generated code, but again you'll have to implement additional logic by yourself in order to replace/extend some snippets. And this so called help will require additional time to be 'civilized' with your Fr

Categories : Selenium

Selenium IsElementPresent() behaviour Selenium 2.33 Java
You'll want to set implicit wait to 0. http://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/WebDriver.Timeouts.html WebDriver driver = new FirefoxDriver(); driver.manage().timeouts().implicitlyWait(0, TimeUnit.SECONDS); http://www.seleniumhq.org/docs/04_webdriver_advanced.jsp

Categories : Selenium

Selenium user-extensions, Selenium IDE
I've found another way to solve my problem.Instead of user-extensions I used storeEval command and wrote 2 lines of javascript code.I used conditional statement instead of if statement. Selenium IDE command: <tr> <td>storeEval</td> <td> selenium.isElementPresent('Element I control')?selenium.doClick('Element which will be clicked if the element present'):seleniumdoClick('Element which will be clicked if the element NOT present') </td> </tr>

Categories : Selenium

selenium - how to change current window location without closing the selenium window?
It can be done, but some magic is required. Use this.browserbot.openLocation in the target. e.g. this.browserbot.openLocation('http://blog.reallysimplethoughts.com/'); Command storeEval Target this.browserbot.openLocation('http://blog.reallysimplethoughts.com/'); Value ignore_me You might want to check out Sel Blocks v1.3.1 and use the if/else around a normal open command.

Categories : Javascript

php Getting value from standalone javascript
To execute JavaScript you need a JavaScript engine. You can do this in a headless browser like phantomjs,or you can try with v8 js extension for PHP

Categories : PHP

xul standalone using jslib
If I run my application with firefox --app the first time it seems a new profile is created. I got the location of this profile with: var file = Components.classes["@mozilla.org/file/directory_service;1"]. getService(Components.interfaces.nsIProperties). get("ProfD", Components.interfaces.nsIFile); alert(file.path); Then I went to my firefox profile /home/me/.mozilla/firefox/82xw54jj.default/ and copied the extensions directory in the profile directory of my application. Now I can use jslib like so: Components.utils.import("resource://gre/modules/FileUtils.jsm"); file = new FileUtils.File("/home"); alert(file);

Categories : Misc

How to use Boost.Filesystem standalone?
Generally, when you're using a library, you don't copy it into your project. Instead, you tell the compiler where it can go find it. In Linux this is extremely simple since there is a common place to put headers, a common place to put library files, etc. In Windows, you usually do this by adding locations to the include and library paths yourself, e.g.

Categories : C++

How to add a standalone window to powershell ise
Sorry if this doesn't answer your direct question, but if you are looking to execute the script you are currently editing in a new PowerShell window then this is something PowerGUI will do out of the box.

Categories : Powershell

Standalone Instance, or Deployed War?
Tomcat will take care of all the HTTP stuff for you. Things like HTTP request and response, sessions, and JSP. Maybe this will help - http://wiki.apache.org/tomcat/FAQ.

Categories : Web Services

Compile standalone .exe with resources
Assuming you want these as embedded resources, you should be able to just use the /resource flag: csc Foo.cs /resource:Bar.exe /resource:Baz.exe If you want them as something other than embedded resources, you'll need to clarify what you're asking for.

Categories : C#

XML Declaration standalone="yes" lxml
You can pass standalone keyword argument to tostring(): etree.tostring(tree, pretty_print = True, xml_declaration = True, encoding='UTF-8', standalone="yes")

Categories : Python

Standalone actionscript interpreter?
There is an amazing online tool capable of compiling Actionscript 3.0, this will aid your investigation of the language! http://wonderfl.net/

Categories : Actionscript

When to use standalone web service approach
I would make my application as a standalone web service if it will have multiple clients like: Web Client via a web browser Mobile App Client Desktop Client Then I could build every one of them alone using whatever the technology I prefer, and make it consumes my standalone web service. For example, You could imagine the guys behind Twitter started developing it by building their core system as web service, then they build an independent web interface application for it, then they built the Twitter Android and iPhone APP, and another one came and introduced a Twitter Desktop client like Tweetbot and TweetDeck ... etc

Categories : Web Services

Do standalone JavaScript blocks have any use?
Short answer: ...not really. The only use I know for them is labels: myBlock: { // stuff if (something) break myBlock // jump to end of block // more stuff if (somethingElse) continue myBlock // jump to beginning of block // blah blah blah, more stuff } (almost like a goto, better watch out for the raptors) Needless to say, this is a very bad idea. So basically, nothing; just don't use them. (side note: a do { /* stuff */ if (something) break; /* stuff */ } while (false) could do the same thing)

Categories : Javascript

How to use RKObjectMapping as a standalone library
If you use RestKit it will replace all of your current code. RestKit is built on top of AFNetworking so you would post your object from RestKit and map the resulting data back into that object. Whether this is useful depends on the purpose of your POST. What you have currently can be trimmed a little if you don't use RestKit by using AFJSONRequestOperation. In general, the question boils down to: What is the data you're posting and expect to receive How complicated is your mapping If the mapping isn't complex, RestKit is probably overkill. From your code it looks like you're making a simple post so that should be fine (and you would construct your mappings to update the object you're posting, even though no data was actually taken from that object to make the request).

Categories : IOS



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.