Tag Info

New answers tagged

0

I am needing the same thing. I would like my test case to generate a new email id every time it runs. for example, xyz@abc.com, then the next time when it runs it should generate xyz1@abc.com, xyz2@abc.com and so on and so forth. Below is my code: int i = 0; for(int count=1; count < 2; i++){ ...


1

You can put ChromeDriver wherever you like if you specify the path: chromedriver_path = "<path_to_chromedriver>" driver = webdriver.Chrome(executable_path=chromedriver_path) It's really up to you if you want in usr/local/bin or elsewhere.


0

I've figured out how to deal with this issue. I used the Visual Event tool to determine that edits to data in the text box triggered the JQuery change event. Next, I learned a bit of JQuery so that I could use it to set the field value and fire the change event. Finally, I replaced my original code with the snippet below. ...


1

For automatically testing an API in a CI/CD scenario, try Runscope. It integrates with several build/deploy tools, including Jenkins (see Jenkins integration instructions here). In fact, I just put out a Jenkins plugin for Runscope that makes it super simple -- API tests are just build steps. You'll find GitHub link to plugin on second link above. You can ...


1

The problem is that you don't switch to opened window, and webdriver searches for elements in the old page instead of the newly opened one. Solution: String winHandleBefore = driver.getWindowHandle(); for(String winHandle : driver.getWindowHandles()){ driver.switchTo().window(winHandle); } This java method's part switches to ...


0

I hope below given points may help you strong to see how this can be done: Find a web page which contains a broken image. Or you can create in your local system. Open your class file and write a code to locate an image such as below. You can use different image attributes(Eg. alt, name etc.) to locate image using XPath. WebElement ImageFile = ...


2

If you are testing for a specific image at a specific resolution then you could either compare the image with the reference image or quicker calculate the MD5 of the image and compare it with the expected. Be sure and wait for the page to be loaded, including images, before validation.


0

You can opt from a range of locating mechanisms- apart from id. You can use the name, the xpath, the css, tagname, etc. for locating a webelement. Here is a detailed tutorial about locating mechanisms http://www.guru99.com/locators-in-selenium-ide.html EDIT : Here is an example where you can use Xpath to select the checkbox AUT : Heroku App You can ...


0

Although an id is by far the easiest, there are many other options to locate an element on the page. All provided alternatives are listed here, with examples: http://selenium-python.readthedocs.org/en/latest/locating-elements.html


0

I had used browsermob-proxy and its Python client successfully in one of my project by using rewrite url to load mocking content. browsermob-proxy is a proxy server for the browser to connect with during testing. Assume you are hosting a webserver with mock content on localhost:8899, below example will load the mock content whenever the browser try to load ...


1

Try out Galen; it's designed for testing responsive web design across different platforms and different sized viewports, so its all about how web elements are laid out on screen: Layout testing seemed always a complex task. Galen Framework offers a simple solution: test location of objects relatively to each other on page. Using a special syntax and ...


0

Every WebElement has a getLocation() method. You can get X and Y of the first element, then get X and Y of another element. After that just compare them to check which element is going first, and which is going next.


0

It rather sounds like your first port of call should be talking to your development team to find out exactly what processes are affecting the text entry. There's definitely something moer than you know if those steps aren't providing results.


1

Does your element put inside in iFrame? If it's in iFrame, you should switch driver to that. OR Could you try with element = driver.findElement(By.cssSelector("div.clearfix.stk_btm_toptabs.text-center>a.stk_btm_chpFlight.active"));



Top 50 recent answers are included