New answers tagged

0

Automating the screenshots can be done by webdriver directly - see example. But I assume that by saying "I record my actions via Selenium" you mean Selenium IDE - that is different from webdriver. Selenium webdriver requires some (not much, especially in Python) programming skills. Python would be more future-proof than Perl, and also easier to learn - ...


0

Instead of automating after the code is done, try to automate during development together with the developers. This way you can solve any issues you run into together. Make it part of the definition of done of a feature. So instead of planning ahead, try to fix issues as you run into them and get a common understanding what is expected from each other. Else ...


0

I feel your pain - I have to deal with the same problem. Protractor (as suggested by Tam Minh) is one way to do that, but for the price: you have to write tests in JavaScript, which is for many (including me) too steep price to pay, because rest of our development and testing is in Python. We use locating elements by other methods: name, class, tag, text, ...


3

Agreeing on good element and attribute identifiers is essential with web applications. Identifying elements is done by developers, designers and automation programmers. In a traditional waterfall environment with most of the requirements and specifications placed up front you can agree that, for example all elements that will be used, checked, clicked on ...


0

AngularJS will generate some HTML, you should take a look on Protractor instead asking for "no dynamic ids"


3

We have found that dealing with third party software in CI/dev environments was a great source of intermittency/failure and pain. So in our CI environments, we always create stub services for third parties. A stub service is basically a fake API service that you control, that behaves the same (or similar) to how the real service does. I would recommend ...


1

I think the plethora of anti-robot measures might indicate that Google does not want you to interact with it using robots, even if you are a Google Apps customer. From https://support.google.com/webmasters/answer/66357: Google's Terms of Service do not allow the sending of automated queries of any sort to our system without express permission in advance ...


3

1: Select Cdropdown = new Select(driver.findElement(By.xpath("//select[@id='ClientId']"))); Cdropdown.selectByVisibleText("centralpen-ak-01"); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); Select Edropdown = new Select(driver.findElement(By.xpath("//select[@id='EnvironmentId']"))); Edropdown.selectByIndex(0); ...


1

adding Thread.sleep(3000) is not a good way to handle synchronization, rather use implicit wait. driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); Implicit wait allows your browser to wait until element is visible or until time set by you, whichever is earlier.


10

Do you think that time is the problem here? If so try to increase the time you are providing in Thread.sleep(); and see it that works out for you. If its not the time, then did you try to find out what the problem is? Are you getting any error?


0

Solution 1 : You are putting extra brackets for this. So remove it: //input[starts-with(@type,'text')][contains(@name,'login')] Solution 2 : You have to use conditions for xpath. //input[starts-with(@type,'text') and contains(@name,'login')] Please let me know If any query.


1

Here is change that I have made in your code- are they 2 different textboxes or single one? If you add screenshot of your textboxes it will clear to all of us- WebElement nameTbox= driver.findElement(By.xpath("//input[starts-with(@type,'text')][contains(@name,'name73652d80')])]")); nameTbox.sendKeys("maheshwagh27");


0

Did you try looking at the second xpath in firepath? It is a possibility that with the second xpath there are more than one element present on the screen and that's why your webdriver is not able to find the xpath. I guess the first one will be failing and the second should be passing because you are using @name, 'name' in first but the @name,'login' in ...


2

If you are asking about this post button - try below code to click on post button. for this- WebElement postBtn = driver.findElement(By.xpath("//button[contains(.,'Post')]")); postBtn.click(); OR WebElement postBtn = driver.findElement(By.xpath("//button[@class='_1mf7 _4jy0 _4jy3 _4jy1 _51sy selected _42ft']")); postBtn.click();


1

After working on this for a few hours with a colleague and doing some in-browser debugging in Safari we came to the following conclusion: The element was not visible ('below the fold') and Safari was not able to find the element to then click on. The solution was to scroll to the area of the page where the element existed by finding a nearby element ...


2

After getting idea from Tango199 answer, I modified his solution and have now implemented below code (once ComboBox is found): HtmlListItem html_listItem = new HtmlListItem(html_comboBox); html_listItem.SearchProperties.Add(HtmlListItem.PropertyNames.ValueAttribute, str_Value); html_listItem.Select(); where str_Value = Value Attribute (like 7311, 7312) as ...



Top 50 recent answers are included