Tag Info

New answers tagged

1

WebDriver cannot be used todo browser specific actions, it can only be used to drive the web-page. Although sending the keys CTRL-TAB might switch tabs WebDriver will still think you are in the previous window. Switching Tabs as you want is thus actually something different. Each tab is actually a window organised in a tab like look-and-feel. Thus you ...


0

I would always vote for hand-coding automated test over the use of Record and Playback. With programming test-cases its much easier to keep the tests DRY and if you think about maintainability of the tests up-front this will safe you a lot of time in the end. Some record and playback tools do support cutting up recordings in pieces and or replacing ...


0

This question is hard to answer without knowing more about the contents of the spreadsheet. Selenium supports two frameworks: WebDriver and Selenium IDE. You use WebDriver if you want the full power of a general-purpose programming language. If you are able to express your test cases in a spreadsheet, you may be better off using Selenium IDE. Of course, ...


0

Hey there's two issues here: A) you're calling ToString on an IWebElement. Try calling vele.Text instead of vele.ToString() instead. This will get you the text of the element rather than a taxi representation of the IWebElement. B) you're using an xpath selector, but you're telling Webdriver that you want to use css selector to locate the element. You can ...


0

Why use XPath in your CSS selector? Just try this (assuming your selector is correct for the page you want to test). WebElement vele = driver.findElement(By.cssSelector("#Result h2")); You need to get the text of the WebElement. What you're doing is converting the webElement object to its string representation. Use this method instead: ...


0

You might installed SDK Studio, If yes, use below configurations. It is worked for me. export ANDROID_HOME=/Users/ivcmbp020adm/Library/Android/sdk export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools


1

Selenium standalone jar and testNg jars are missing . So just keep these jars in you Lib folder and this will resolve your problem. Since in build.xml you have provided jar location to lib folder. So please keep all your jar files in lib folder and this will start working without showing any error. Good Luck


0

I am not sure on how to get the Selenium version through code. I dont think there are any methods to do so. But, the version is clearly mentioned in the CHANGELOG file that comes along with your Selenium installation. You can read the version from this file. Below is the content of the log file: v2.43.0 ======= WebDriver: Updating Native ...


2

Create a string variable and use it (for example) as follows: string strMyXPath = "//*[@id='" + recordId + "_ACTION_COLUMN']/a[2]/span"; driver.FindElement(By.XPath(strMyXPath)).Click();


0

This is the way as per the link $this->select($this->byId('month'))->selectOptionByValue(2); OR $this->select("month", "label=Option label"); $this->select("month", "value=Option value"); $this->select("month", "id=Option id"); $this->select("month", "index=Option index");


0

Assuming I understand your question correctly... You should store the ID (of the window you're trying to close) in a variable. After calling the close method, check if the window ID still exists. If it does, something went wrong. Example in C#. Instead of the String.Equals check, you can also get a list of all windowHandles and check if the specific handle ...


2

Quickly glanced over the properties and methods of IWebElement, doesn't look like they can set values. However, you can easily execute some javascript snippet to change HTML in your page. IWebDriver driver; IJavaScriptExecutor js = driver as IJavaScriptExecutor; js.ExecuteScript("document.getElementById("title").innerHTML = "New text!";"); You might need ...



Top 50 recent answers are included