I'm trying to send a backspace key in Katalon to my web application. I know how send a string.
//this works
WebUI.sendKeys(to, '50.00')
//This doesn't work
WebUI.sendKeys(to, Keys.Backspace)
This didn't work as keys.backspace isn't a string, but I don't know what to do.
Use the Keys.chord() function. For example:
WebUI.sendKeys(to, Keys.chord(Keys.BACK_SPACE))
Hope that helps.
Related
Anyone know "How to wait for element to be visible for Mobile app in QuaMotion".
I wonder if anyone has used Quamotion for automation of mobile app.
thanks in advance
The product manager of Quamotion here.
We implement the Selenium/WebDriver protocol, so you can use the same commands you'd use to wait for an element in Quamotion as you'd do in Selenium.
It depends a bit on which client you are using (C#, PowerShell, Java,...) but the construct is always the same.
For example, in PowerShell, you can use the Wait-ForElement command to which you can pass an XPath expression, a marked statement or a class name.
If you'd want to wait for an element with the text Login, you can use this command:
Wait-Element -marked 'Login'
This will block your script until this element is visible.
If you're using another programming language, let me know, and I'll update my answer.
I need to know how to simulate the Enter key press after typing in a URL in a mobile web browser using sendKeys().I tried
driver.sendKeys("http://www.google.com\n");
which did not work and
driver.sendKeys(Keys.ENTER);
just clears the whole url box.
So it would be helpful to know.
BTW i am using Appium server for the automation.
Try this, hope this will help.
driver.sendKeys("http://www.google.com", webdriver.Keys.ENTER);
This will do it for you. Enjoy!
WebElement we = driver.findElement(By.cssSelector('the selector');
we.sendKeys("your text" + Keys.ENTER);
If you'd prefer to method chain the whole call
driver.findElement(By.cssSelector('the selector').sendKeys("your text" + Keys.ENTER);
I am using Selenium IDE, and every time I enter an ASCII value the recorder changes it by adding an extra . For example: \9 changes to \\9.
Is there a way to correct this?
Or better yet, is there a better way to simulate tabbing, returns, and other non-character keystrokes?
Thanks!
You can use ${KEY_ENTER} and ${KEY_TAB}. For other keys it is the same as ${KEY_F8},${KEY_ESC}.. etc
Here is a blog post with more details.
http://blog.reallysimplethoughts.com/2013/09/25/using-special-keys-in-selenium-ide-part-2/
I'm new at Visual Basics and I'm trying to fill the forms of the following website:
http://www3.dataprev.gov.br/cws/contexto/hiscre/
I tried using this line of code:
WebBrowser1.Document.GetElementById("nome").SetAttribute("Value", "Test")
However, whenever I try I got the following error:
A first chance exception of type 'System.NullReferenceException'
occurred.
I would appreciate if someone could help me to accomplish this, it would save me a lot of time if I could automate this task.
Thank you in advance, Daniel.
WebBrowser1.Document.GetElementById("nome").InnerText = Test
That will select the input named "nome" and fill it with the text "Test"
Hope this helps.
According to Microsoft documentation, the SetAttribute function your are using is case sensitive.
You'll need to replace "Value" for "value".
WebBrowser1.Document.GetElementById("nome").SetAttribute("value", "Test")
However, the kind of error message you are getting seems to occur before the call to the SetAttribute function. Go in debug mode and make sure that every objects used before the SetAttribute function are not null.
You need to be using a combination of WebClient and HtmlAgilityPack. See these examples:
How can I download HTML source in C#
How to use HTML Agility pack
eb.event_search(options, function (response) {
alert(response.size);
This is the main point of mine.
Hmm actually I already know what fields are the event_search has.
But.. the problem is I can't use it at all.
Here is the link.
http://developer.eventbrite.com/doc/events/event_search/#
There are a lot of feilds but whatever I do.
I can't use it.
such as
alert(response.num_showing);
alert(response.total_items);
alert(response.events.summary.num_showing);
alert(response.events_summar_num_showing);
alert(response.evnts_summary.num_showing);
But I got nothing.
Please let me know how to use them.
Thank you for your time.
I'd console.log(response); to see what you have.
You should also be able to get a preview of the object structure by using the 'Try it Now' button on the event_search API documentation page.