Tag Info

New answers tagged

0

try to change THIS <tr> <td>storeEval</td> <td>javascript { storedVars[&quot;EclipseCost&quot;].substring(9,16);}</td> <td>y</td> </tr> for THIS <tr> <td>storeEval</td> <td>storedVars['EclipseCost'].substring(9,16)</td> <td>x</td> ...


2

I am only working with Page Objects which makes it pretty straightforward to keep them inside the page object where it is used, meaning inside a class. Actually this way you are accomplishing some things that are important for successful automation projects: DRY principle (only this one class contains and cares about your xpath) Ease of use (no ...


0

I think you can change the settings of Firefox so that it just download without showing a download file dialog. https://support.mozilla.org/en-US/kb/change-firefox-behavior-when-open-file You cannot handle native OS dialogs with Selenium IDE, if you can't disable the download dialog, then your only option is dropping the IDE and writing Selenium tests in ...


0

Process.Start("cmd.exe", "/C java -jar selenium-server-standalone-2.47.1.jar -role hub"); You didn't specify any port for the hub. Then the default hub -port is port 4444. I'm wondering why you were trying to connect "http://100.100.10.100:5555/wd/hub" instead of "http://100.100.10.100:4444/wd/hub" ?


0

If you want to be a greater tester, you need to cultivate a mindset of curiosity and skepticism. Without that, knowing tools and frameworks is useless. On the other hand, not knowing tools and frameworks will slow you down. That knowledge is not sufficient, but it's necessary. If you expect to read your developers' code, you should learn whatever ...


1

This mentions this remedy for this error : If you are using the RemoteWebDriver and you get the The path to the chromedriver executable must be set by the webdriver.chrome.driver system property error message you likely need to check that one of these conditions is met: The chromedriver binary is in the system path, or The Selenium Server was ...


0

First you have to locate the web-element uniquely presented as select list on UI, you can use Firebug for that to find list element's id, name, xpath or css path. Then create SelectElement object passing this element locator attribute. To select an option in the list, you can choose any option like SelectByValue or SelectByText. using OpenQA.Selenium; using ...


1

In the data provider, pass another string to indicate whether to execute the assert or not. Change your assertTrue to check for that. Something like following: @DataProvider(name = "VINNumbers") public String[][] VINNumbers() { return new String[][] { {"2T1BU4ECC834670", "true" }, {"1GKS2JKJR543989", "false" }, ...


1

Joe is absolutely correct. Imagine you have been given a duty to prepare a tea. You have been given a tea pan, and the ingredients to make tea (water,sugar, milk, tea leaves, and some ginger as well ). All these ingredients are from different brands. Consider the tea as your end product and the ingredients to be the various components which will allow you ...


1

You can enhance your java-Testdriver scripts by datadriven ability. With such, you can do much more tests with single script. Disadvantage is, you have to think about maintain datasets for different tests. Datadriven testing is followed by technology leaders as Tosca Testsuite. Another thing you can try with Selenium is mastering Xpath to make better and ...


3

is there any package of different toolkits and frameworks that if I learn them I could call myself a good tester? Good testers aren't defined by a magic set of toolkits and frameworks. Good testers are defined by their ability to test in lots of contexts - automated, manual, etc. In particular, good testers are good thinkers who can understand the ...


0

I like to use below format to avoid quotes errors WebElement element= driver.findElement(By.xpath("//div[@class='btnContr']/input[@value='Cancel']")); JavascriptExecutor executor = (JavascriptExecutor) driver; executor.executeScript("arguments[0].click();", element); Hope it will help you :)


0

Splinter does not support find_by_class_name. Splinter has support for find_by_option_by_text and find_option_by_value but it does not look like you have the option tag in the html. Try using find_by_css instead for the list elements. This code snippet assumes your list items are visible: browser.find_by_css('.option1') If they are invisible, you will ...


1

The correct way for you to answer would be something like "I'm new to Agile, so I don't really know." If you have non-Agile experience, you could expand on your answer and talk about the number of test cycles on the projects you tested. And if you have read enough about Agile to feel confident that your reading applies to this particular context, then you ...


0

For The Agile Model Driven Development (AMDD) life cycle, it may depend upon number of factors like Number of user stories to be covered Duration of the Sprint Complexity of the PBI's Number of testers working in that sprint and their efficiency Most important - Skillset of the development and testing team. If your development team is new to project and ...


0

If test is running successfully on other browser then there is configuration issue of IE on machine. Make sure version of Selenium, IE driver and IE browser are compatible Ref. selenium release log Also verify required configure mentioned here


0

The issue is with the IE versions, your machine should be having both IE versions i.e. 32-bit and 64-bit and when you start the 'IEDriverServer.exe' it calls the 64-bit IE version while you are using 32-bit IEDriverServer.exe. I faced this issue too and observed that when any tool starts IE then 64-bit IE is launched by default (I was on Windows 7 and IE-9), ...


0

Usually I keep them in my code specially during the implementation and before SUT is stable. Also when it is in the code, you have more control who/how can access and modify them. On the other hand, keeping them in a separate file can help in: Updating them easier Having separate XPath files for different environments and switching between them based on ...


0

I first took the the above data in a string. then i used the regex to extract the "data":["1320649","1301971","1312053","0","0","0","0"]}] part. After this i again used the regex to extract the numbers only and so on and so forth. It was tedious but it worked good. I took regex according so that on any day if the string changes some how my code should ...


0

Page objects can be flexible and should reflect the way you write and maintain your tests. For myself, I typically keep my page objects as compact and stateless as possible. If your pages have a lot of re-usable components, you can put those into smaller classes that encapsulate that functionality independently, then you can use composition to integrate ...


2

Unfortunately, I don't think there is enough information to make any alternate suggestions. It would be better if the popup has some visible text that's unique enough then you can use it for identification. Also, when you say popup, do you mean A dialog box? Or, An alert? Or, A lightbox component? This is one way in which you can get to that ownerId ...


0

That is one of the reasons why M.Fowler said "Write as few end-to-end tests as possible". General recommendation is to try to cover as much as possible in your lower level tests (which are faster) e.g. Unit, Integration, Component Tests. If you have no other options: Try to use headless solutions e.g. phantomJS. It may help to have less flakey tests ...


-2

weather GUI and slkuli are open soure


0

If PhantomJS is giving you trouble I do not think there are any good headless alternatives at the moment. What you could try is setup a Virtualmachine to run the tests against that, this way it runs against a real browser, but its not in the way on your desktop. Even better is to setup a Selenium grid and run the tests there. If setting up a Virtualmachine ...


0

Why don't you use c# code itself ? Outlook.Application oApp = new Outlook.Application(); Outlook.NameSpace olNameSpace = oApp.GetNamespace("mapi"); Outlook.MAPIFolder oInbox = olNameSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox); Outlook.Items oItems = oInbox.Items; ...


0

Use Selenium Remote Web Driver. As detailed in this SO question IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.HtmlUnit()) IWebDriver driver = new RemoteWebDriver(DesiredCapabilities.HtmlUnitWithJavaScript()) I would stick to a non-headless browser. Chrome is the fastest here. It's far easier to debug and, from my experience, even ...


3

End to end testing will always have a certain amount of flakiness. If you work on a single app or website full time then you start to figure out the characteristics of it and how to deal with them. Timing issues is usually the problem for myself... But getting to know how to use the WebDriverWait class with ExpectedConditions helps dramatically since it ...


1

FDM has the right idea. Since his example is C#, I thought I'd provide a Java equivalent: /* * Returns true if the at least one element is found. * If none are found, a list of size 0 is found. */ public boolean doesElementExist(String id) { return driver.findElements(By.id(id)).size() != 0; } This example is very basic and doesn't try waiting for ...


1

According to the official documentation, findElement should not be used to look for non-present elements, use findElements(By) and assert zero length response instead. It's easy to put that in a wrapper method, and temporarily reduce the implicit waiting time to a very low number. An example in C#, kind of: public static bool ...


1

Slightly different approach, this worked for me @AfterMethod public void writeResult(ITestResult result) { try { if(result.getStatus() == ITestResult.SUCCESS) { //Do your excel writing stuff here } else if(result.getStatus() == ITestResult.FAILURE) { ...


0

I don't know why you want the output like this , but i can think of one way of getting you the class name instead of the whole xpath, System.out.println(heading.getAttribute("class")); which will give you result as page-title category-title Then you can prefix & postfix with you xpath string if only you want the output like that, then again as i ...


1

I am not sure Selenium is the right tool to test JSON API's. JSON Viewer: But you could add a JSON viewer extention to the browser: Chrome: https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc?hl=en Firefox: https://addons.mozilla.org/en-us/firefox/addon/jsonview/ Internet Explorer: ...


0

Here is how to set databases in django in general: Django Settings: DATABASES This is about writing and using tests in django while this link is about using unit tests in django and configure database settings for it. It's all from the django manual. I can't evaluate if it helps as I'm not into django.


1

I can tell you the approach, because we have we used similar thing in our project but not with Selenium. I think this will work with Selenium too. First you need to open the text file in browser (Firefox) using Selenium (this can be done, launch browser and set the navigation URL which should be the path of that text file) and then move your focus to that ...


1

I do. I use Python. In page object, I use dictionary to map locator names to locator values. So even if locator value changes, its name stays same. To fill the form, I create good old Dictionary, mapping locator names to values to be filled. Sometimes page fields needs to be filled in exact order, in that case I use Ordered Dictionary. Base page (from ...


2

TL;DR: Yes, but keep in mind that Selenium is only part of the integration test tool chain. If we define integration testing as something like this: Integration testing is the phase in software testing in which individual software modules are combined and tested as a group. Then Selenium is only part of the integration testing phase, since it does ...


0

Select dropdown = new Select(driver.findElement(By.id("some id"))); dropdown.selectByVisibleText("Some Text");. This will access control to a dropdown but make sure that you have given enough time using Thread.sleep("3000") command. You can use ByVisibleText(), Byindex(), Byvalue() to get the desired text.


2

Yes, Selenium can be and is used for Integration testing and it is a good tool for that. You can use Selenium with TestNG framework which is designed to cover all categories of tests: unit, functional, end-to-end, integration, etc.. Refer to TestNG site, it's first line states that it is used for Integration testing with Data Driven Testing. For Acceptance ...


1

If you can alter your approach to include a configuration method using @AfterMethod, then you can pass in a paramater for ITestResult, which holds the results for the most recently completed test method. That class has a method called getStatus() that will give you the status of that test. Here's an example of how to use this: @AfterMethod public void ...


1

Yes, it makes sense. To quote Martin Fowler in http://martinfowler.com/bliki/PageObject.html, Despite the term "page" object, these objects shouldn't usually be built for each page, but rather for the significant elements on a page. So a page showing multiple albums would have an album list page object containing several album page objects. There would ...


0

Depending on how many more similar elements you have on the page, an xpath like the following may do what you need: //input[@type='text'][contains(@class,'form-control')][contains(@name,'projectsurvey')]


0

https://code.google.com/p/selenium/source/browse/java/client/src/org/openqa/selenium/support/ui/Select.java here is a class designed for this in the bindigs. You are looking for the Select class: https://code.google.com/p/selenium/source/browse/java/client/src/org/openqa/selenium/support/ui/Select.java You would need to 'find' the actual select element, ...


2

Since drop down contains more than one values, so we need to make selection out of a range of options. So there are three ways of getting or selecting elements from a drop down using the Select class of Selenium webdriver: Using the index of element in drop down. Using the Value of element in drop down. Using the text of element in drop down. Consider ...


1

There are two sides of your question which I am interpreting (and may be I am wrong), but this is how I see it : You can choose your language based on the ease of learning. You can choose your language based on the support for that particular implementation. Let's talk about first- I have used both Python and Java implementations and I agree with Peter, ...


0

According to the TIOBE Index Java is still the number one language for programming. Java will also net you the most online support because of this on for example Stack Overflow. JavaScript is becoming more popular though, certainly with the rising of NodeJS. I would bet on JavaScript more then Java or C#, since its the language of the web. For a decent ...


5

I am assuming that you: want to become competent programmer, with goal to learn programming beyond Selenium automation. have nobody around to ask for guidance (if you do, ask locally) also want to be able to write simple tools supporting QA tasks, and beyond. Python is widely considered as best language for beginners (MIT among others). It works much ...


7

See, you can learn Selenium with any language whether it is C#, Java, Ruby, Python etc. It doesn't matter application which you are going to test has been developed in which language, you can test the C# application in Selenium with Java. In addition to it, you don't need to learn any of these language completely for working with automation. You should know ...


0

If you want to learn from scratch I think that Java will be good, because there is a huge amount of support from the community in this language (I think most of the people use Java with WebDriver). I've started with Java and for any question or trouble there always was somebody that could help me. Now I'm using Python with Selenium, and experience that ...


1

The way I corrected this was to manually copy the ddt files from /usr/local/lib/python2.7/dist-packages to /usr/local/lib/python3.4/dist-packages Copied the following two files : ddt.py ddt.pyc and the directory ddt-1.0.0.dist-info If any body could come up with a better solution, then please add your answer. It would be more than welcome :)


0

We have recently launched http://backtrac.io project that also allows you to run set of screenshots and compare them. One of main features right now is ability to compare your production and staging environments. In this way you can see what is going to be changed very efficiently and in this way catch bugs early.



Top 50 recent answers are included