Tag Info

New answers tagged

0

Read essay about the evolution of programming languages language for next 100 years and another one, finding a language to beat averages which explores language expressive power, using Blub as example (to avoid religious wars - because selecting a language is for many people emotional issue like selecting a sports club). Before you start test automation you ...


0

The interesting part of Selenium (the part that controls the browser) -- is a Javascript library that runs in the browser. The multi-language API is a set of libraries that talk to that Javascript library. Each API has the same browser control primitives. There are other libraries that might make working with Selenium more convenient, e.g. support for ...


1

So selenium was created in java, so they have all of the advantages of updates and community for questions. I personally like C# because of my background with the .NET technologies. I know that people have recommended that I switch to java because of the community base, and how quickly things are updated for their technology. So to answer your question, none ...


0

If you use Selenium IDE to make tests and export to C# you will find that not all commands are availible. So you dont gain any features but you might lose some in the translation process. Essentially, a thrid party plugin converts from Seleniese to whatever language. Use whatever language you feel comfortable using.


2

Setting up Selenium tests to run on Safari browser is a fairly complex process. You need to install Safari Extensions Developer Certificate in your machine and also install selenium webdriver as an extension in Safari Browser. Also there are some stability issues with Safari browser automation & Selenium combination on Mac 10.9 OS and below. The ...


0

Try either: driver.find_element_by_xpath(u'//a[text()="Foo text"]') or dedicated driver method: driver.find_element_by_link_text("Foo text") Add .click() if needed. For troubleshooting, check this post at SO, as maybe your page isn't loaded yet, so you probably need to write a wait wrapper to wait for an element to appear.


3

List cheeses = driver.findElements(By.className("cheese")); findElements() does not wait, but returns list of elements (located by locator). List is empty if nothing is found. http://docs.seleniumhq.org/docs/03_webdriver.jsp


1

You mention in the comments: What happens in my application is, after POSTing something, it takes sometime to update everything(indexing involved), for that specific reason we need to wait sometime and refresh the page, otherwise if I use wait for condition/wait until element is visible/wait until page contains/wait until page contains element , I cannot ...


1

I really like the answer from the link Philip Beadle posted in a comment: It's a bad idea to test the core browser's behaviour as it's not your logic, i.e. you should not need to test that arrow keys work with options since that's something your browser implements. And some Protractor (JavaScript) examples how to handle the drop from the same ...


0

Actually 'throws exceptions' is the only way to get error. If error comes from your setup or dependency it will not shown If you remove throws statement. If you are not confident about which exception is coming then write 'throws Exception'. It will throw all exception by default. Now come to your question. Your code perfectly fine working. Just check ...


3

This error means that you have forgotten to include a dependency in your project. It's been suggested on stackoverflow that the dependency you forgot might well be selenium-server-standalone-version.jar. Does adding that jar to your project help?


1

In order to run Webdriver commands on a remote machine, Selenium Server must be installed on that machine. What I usually do to enable IE and Chrome support is place the IE and Chrome drivers right alongside Selenium Server. I can then create a batch script with the complete command, something like: java -jar selenium-server-standalone-2.44.0.jar ...


-1

I used Java Thread and Robot with Selenium to automate windows active directory authentication. You may refer to my response here Windows Authentication using Selenium and Java Thread.


4

I've tested using format http://user:pass@host and it works. So in Python (in setUp() of MyClass(unittest.TestCase) class) this should look like: self.base_url = "http://user:pass@host" In Java based on #34 at code.google, the following code should work as well: public void login(String username, String password){ WebDriver driver = getDriver(); ...


0

Create one folder Util in your test project and place the chrome drive in that. in your driver and set the system property with the relative path. Now wher ever you take your code your chrome driver will also get copied and driver setup will always read the system property from the relative path. This way it can be run from any machine.


1

driver.findElement(By.cssSelector("div.container-fluid > h3")) The findElement returns a WebElement and not its text and thus you cannot compare them like that. WebElements have a function getText() to return the text of the object. The assert should look like this: assertEquals("Risk Assessment Form: Completed", ...


0

If you are using firefox then you can set preference for default timeout: fp = webdriver.FirefoxProfile() fp.set_preference("http.response.timeout", 5) fp.set_preference("dom.max_script_run_time", 5) driver = webdriver.Firefox(firefox_profile=fp) driver.get("http://www.google.com/") This will stop page load after 5 seconds.


0

Several things I notice: Are you sure the element is, in fact, visible when in release mode? Are you storing a reference to div B before you click on div A? If the code deletes and re-creates div A, your old reference to div B won't be valid anymore. Try doing a find just before you need to click on div B. Why are you using Actions in the middle of your ...



Top 50 recent answers are included