Tag Info

Hot answers tagged

4

Yes, Selenium is an active project (see commit history on GitHub). Then why are there so many unresolved open issues? It's open source. We can't expect the team members to fix bugs on a daily basis, because they are just enthusiasts and all have real-life jobs. The developer in charge of a particular area may not have time to deal with it right away, even ...


3

Sadly, it sounds like using the ID is not an option in this scenario A lot of websites implement security to prevent automating. While this makes your job more difficult it does improve the security of the application. So what can be done to bypass these security tricks? Use a different unique constant for that element This could mean using the class, ...


2

Please Use select.selectByValue("Vodafone"); OR kindly post the HTML code and go through this Link Link As per your comments below updated the code: import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.support.ui.Select; ...


2

You can't capture the id's every time, you need to find some other way of uniquely identifying the elements. I'm assuming this is a 3rd party tool that you don't have any control over, but if you do have control you could ask the developers to provide either a unique ID or some other unique identifier. Some other options you have would be to identify ...


2

I just set the Selendriod up last week with this guide on the official site selendroid.io/setup.html. It's a step by step since System Requirements to the first test case. I think it's a good kickstart, pretty straight forward. You could post for a specific question, if you are struggling in any step. Hope it helps,


1

You are comparing values, so better you store each values in the String and compare both the String values.


1

Use another identifier to identify the object or use xpath, for example: starts-with If your dynamic element's ids have the format where button id="continue-12345" where 12345 is a dynamic number you could use the following XPath: //button[starts-with(@id, 'continue-')] contains Sometimes an element gets identified by a value that could be surrounded ...


1

@Subbarao: These links may help for you, Link1, Link2 and Link3


1

You might try WTFramework It seems like a decent starting place for python test infrastructure. I didn't end up using it because my tests ended up using more php and javascript. There are examples of using the page object design pattern.


1

@anshu Use .getText method and store the value in a string (Both step C and E) and compare the both the Strings, Ex: .equals. (Also you can use if-else condition).


1

Use webdriverWait and ExpectedConditions: from selenium2.webdriver.common.by import By from selenium2.webdriver.support.ui import WebDriverWait from selenium2.webdriver.support import expected_conditions as EC WebDriverWait(driver, WAIT).until(EC.element_to_be_clickable((By.ID, id)))


1

Please use below code. driver.get("http://www.flipkart.com/"); driver.manage().window().maximize(); driver.findElement(By.linkText("Trimmer")).click(); WebElement scroll = driver.findElement(By.id("brand")); scroll.sendKeys(Keys.PAGE_DOWN);


1

You can refer this link and let us know is this ok for you Link


1

you can use following code to switch between windows based on the window title. or please go through this link Link private void handleMultipleWindows(String windowTitle) { Set<String> windows = driver.getWindowHandles(); for (String window : windows) { driver.switchTo().window(window); if ...


1

Yes, definitely, documenting your project is absolutely necessary. But I'm not talking about for automation tests specifically, but for all programs in general. Selenium automation tests are programs just like anything else, which means that all coding standards within your company should also apply. The quality of the automation tests should be as high as ...


1

As elcharrua writes you can use JavaScript in Java tests with the JavascriptExecutor. This will execute the JavaScript in the Selenium browser session if it was JavaScript from the website itself. But if you want to write the whole test in JavaScript look at WebDriver.JS Simple example var webdriver = require('selenium-webdriver'); var driver = new ...



Only top voted, non community-wiki answers of a minimum length are eligible