Tag Info

New answers tagged

0

FirefoxDriver driver = new FirefoxDriver(firefoxProfile); driver.Manage().Window.Size = new Size(200, 200); // Resize Window driver.Manage().Window.Position = new Point(-2000, 100); // Put the window outsite my current window


0

This is how it can be done - Download selenium from here https://pypi.python.org/pypi/selenium Assuming that you are on windows use - python setup.py install Download IEDriverServer.exe and put it in your path from selenium import webdriver from selenium.webdriver.common.keys import Keys driver = webdriver.Ie("C:\\Python34\\IEDriverServer.exe") //Your ...


0

Assume that your text box has an ID eg: app_title, you can hover over it using element = @driver.find_element(:id,"app_title") @driver.action.move_to(element).perform This will place the mouse focus on the textbox and you will see your edit icon on the screen. After that it is simple, you can click on it using ...


0

is it any way to get object by combining UI elements in such way: hp.get(Widget.class, "Page name").get(Link.class, "Link name").click


0

Just one issue I see with your CSS selector. When you select by attribute, you need to enclose the attribute value in quotes. Other than that, the * is also probably unnecessary as this should be an exact match: driver.findElement(By.cssSelector(".simplecolorpicker > span[title='#ff8081']")).click(); CSS selectors are pretty awesome, there is no ...


0

I would do it on this way: Create a class with methods that you use to create new WebDriver instances as easy as possible. E.g.: WebDriver userOne = DriverBuilder.getUserOne(); WebDriver userTwo = DriverBuilder.getUserTwo(); With that you have two WebDriver instances and you can control each on them separate. You do not have to use different browsers. ...


1

I made your code readable. Please do that from now on. Your flow is as follows... if span[1] is not selected then click span[1] else if span[2] is not selected then click span[2] Please clarify what precisely is happening so we can help you properly. EDIT As I mention above your second part is checking if span[2] is not selected... If Element 1 ...


0

You should migrate action methods to TouchAction class, in case of swipe, try this: def swipe(start_x, start_y, end_x, end_y) Appium::TouchAction.new.press(x: start_x, y: start_y).wait(1000).move_to(x:end_x, y:end_y).wait(500).release(x: end_x, y: end_y).perform end Check API in here: ...


0

I had exactly the same issue some time ago. I was waiting for content of gxt window to be loaded and many times I failed because of timeout exception. Normally window was loading content about max 5 sec, but with WebDriver even 30 minutes was not enough. What I found was that timeout happened because of WebDriver was causing DOM not to be properly loaded ...


-2

http://blog.bahwancybertek.com/html5-canvas-automation-using-selenium-webdriver/ can be helpfull in your case.


0

I just gave XLT a try. It records the stuff in Firefox and you can replay it later in FF again, also as batch test. Works fine, does not need any other tool. Also got it working with the FirefoxDriver and ChromeDriver without any additional tools. The trick is to make the file input element visible (line 13) and the type command will be accepted and ...


0

I've worked with applications that have multiple components, but start looking funny and behaving oddly when you cross sessions in the same browser instance. This is likely because the developer reused code, which is a good practice wherever possible. I would close the browser and then re-open it, get the url and continue in case this is what's happening ...


0

i'm using this and it's working for me. public void login(String username, String password){ WebDriver driver = getDriver(); String URL = "http://" + username + ":" + password + "@" + "link"; driver.get(URL); driver.manage().window().maximize(); }


2

WebDriverJs is just the driver to control the browser. For the tests itself I recommend a JavaScript based testing framework like QUnit or Mocha. The test framework take care of the test reports. Mocha is also mentioned on the WebDriverJs wiki page. You can find more information about how the reporting works on the official websites. QUnit: Bottom left of ...


0

I cant actually see your example code properly. But I have had a similar issue to you where I wasn't closing the connection to emailable-report.html between test 1 and 2. So when test 2 tries to write its results into the html file it is still "in use" by your first case. //Writing In to file. //Create Object of java FileWriter and BufferedWriter class. ...


1

Try again with the latest version of the maven-surefire-plugin. This is the config I am using which works fine <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>2.18.1</version> <configuration> ...


0

Thanks for your suggestions Guys I have solved my problem by using the javascript executor. Below is the code: var element = driver.findElement(webdriver.By.xpath(xpath)); driver.executeScript("arguments[0].scrollIntoView(true);", element);


0

Actual syntax is : driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS); So in you case please remove 1 from below: ((Object) ((org.openqa.selenium.firefox.FirefoxDriver) (FirefoxDriver) driver.manage1()).timeouts()).implicitlyWait(5, TimeUnit.SECONDS);


0

((Object) ((org.openqa.selenium.firefox.FirefoxDriver) (FirefoxDriver) driver.manage1()).timeouts()).implicitlyWait(5, TimeUnit.SECONDS); manage + 1 ? I think your problem is the 1 in this line. Do you use a IDE (like netbeans), it should show where the error is. Also do you have developers around, they should be able ...


-1

Best practices recommend to use XPath as locator of last resort. Did you tried locating element by ID or name? Or even CSS?


0

U should try scroll to element. it is in api. Element should be visible to interact with it. also check: Did it occurs when windows is maximized? Did it work with css locator? Is it browser dependent?(on all drivers or specific one).



Top 50 recent answers are included