I am automating login scenario of an application.
The execution steps are as below:
Select the Country
Enter the Username
Enter the Password
Click on Login Button.
Actually after entered the username, application validates the country and username in database exists or not.
When tried to automate through robot framework, this validation is not called and so unable to login (actually login button is clicked through script, but no error message or no response user is in same page).
When i verified exact scenario it calling the validation, comes to know that
validation is called on onblur of the usename element onblur="getlocation()".
I tried to simulate this by give tabout from username field through script as
Press Key ${element path} \\9 but it is not working always out of 10 run only 3 or 4 times it working.
Is there any way we can do 'blur` action on the element in robot framework
In the Selenium2Library for robot, there is a special keyword for that:
Simulate <element> <event>
In my keyword definition it looks like this:
I Enter The New Password
[Arguments] ${text}
Input Text ${INPUT_ELEMENT_PASSWORD} ${text}
Simulate ${INPUT_ELEMENT_PASSWORD} blur
http://robotframework.org/Selenium2Library/Selenium2Library.html#Simulate
I hope that helps, it took us a while to figure out what was missing in the test.
Just to save few minutes of googling.
Simulate
is deprecated. Use
Simulate Event
instead
Related
I have a simple Tosca Test Case Template which takes data from a TestCaseDesign Sheet. The scenario is simple - It just launches the browser, navigates to a login page, enters username and password and clicks the login button. I have just two values for username and two values for password in the TestCaseDesign Sheet.
I linked the TestCaseDesign Sheet with the Test Case Template and generated two test instances.
Now, when I select and run these two test instances using the Scratchbook, I would like that the browser automatically closes after each test instance passes or fails so that the next test instance can open a new browser as a first step.
Also, I would like to take a screenshot before the browser closes.
How can I achieve that using Tosca?
What kind of event should trigger the functionality?
A user presses an InlineKeyboardButton within the bot itself
What kind of chat is the functionality supposed to work in?
The button is on a message that is from a bot to the user. (i.e inside chat with a bot. NOT in a group/channel)
How do you want your bot to react?
I wish to read the text of the message using text = str(update['callback_query']['message']['text'])
I then wish to edit that message using query.edit_message_text(text=text, reply_markup = keyboard)
What is the problem?
In step 1, that 'text' field is completely missing in the 'Update' dictionary.
As a result, the 'edit_message' in step 2 dont work and throw "Message to edit not found telegram"
The above behavior occurs for posts about 48hours from today. Meaning the inlinebutton works normally first, then after ____ period of time passed, the error described above is observed.
What is my hypothesis?
Telegram side deletes that information and dont allow me to call it after ____ period in time.
The event raised by clicking on a phone number will either be of the form "tel:" or "skype:". Here are the steps I've followed so far to enable a window navigation rule to capture the event, and I've attached events to the rule to actually see the action get fired in the Debugger. Still, even with navigation rules set to capture tel: and skype:, the action will never fire in USD Debugger. Here is the general approach I've used so far (From another post):
Create a Windownavigation rule.
Don't put anything into the entity Settings but put "tel:" or "skype:" into the URL TextBox.
Routetype will be Popup
Target will be Tab (or registercard, at least I think that's the name for it in english - I'm using a german one)
Define None as Action in result for your Windownavigationrule
Create your own Action to resolve when the Navigation rule is triggered
Set your own hosted control (In this case I use the CTIConnector class.)
Define an Actionname for your Action that will be exectued (I named it "MakeCall" in CRM)
Set Data to [[SUBJECTURL]] so the URL ist given to the Action als Parameter.
Override the method DoAction from your hosted control
Just 2 -3 points to verify.
Do you have a UII action with the name "MakeCall"? If that is there then only your code will be triggered from DoAction.
In case, if you have above in place please check whether your action calls and other records are added to the respective configuration reocrd?
Working on Work Execution app (v 7.5.2). In MAM, Field having datatype as INTEGER (4) but when I enter values "1234567890123456789' in Anywhere, it doesn't throw error instantly but after saving, It throws "Database error number -4461 has occurred when operating on WORKLOG : WorkLog ID=1234. Report the error to the owner of the deployment."
Either User should warn immediately after entered or Need to restrict the MaxLength to enter in TEXTBOX. How to do ?
You can put some validate javascript code on the dataChange event for this field to validate that less than 4 characters were input. You can also open a PMR as this seems like a limitation that we would address in a future release.
I am trying to run a test on selenium IDE to enter to my Gmail, select the specific new email from all my email enter and click on a specific link that the email has.
I've been going round and round this and cannot find and answer!
I have read another post that has this help:
//div[#class = 'y6']/span[contains(., 'subject here')]
This does not help because the same email has been sent lots of times.
This case has the following particularities:
1. Since is a case that it will be run several times, emails with the same sender, subject and body will be send.
There should only be one new email every time the test is fun, since the idea is to enter and check the last email.
Inside the email there is a button that needed to be press, which I have the id, but I just need to enter the email to do so.
I have used the following CSS that so far has found what i need to click, but when I ask Selenium IDE to click it, it does nothing (clickAt, clickAndWait, clickAtAndWait... nothing!)
css=div[class=yW] > span.zF:[email='myemail#myemail.com']
I have also notice that the class="zA zE" in Gmail indicates that the email has not yet been read.
Help!
Thanks,
This is strange, because clickAt | css=div.yW > span.zF[email='myemail#myemail.com'] works fine for me. More than that, clickAt | css=span[email='myemail#myemail.com'] will always open first message(last one) with this email in the list.
BarbSchael,
A similar solution can be drawn by using Xpath of the FROM field.
I used this command:
clickAt | //table/tbody/tr/td[5]/div[#class='yW'] |
Click at the FROM field of first/recent/top most mail to go to mail detail page. // note: tr for first mail, tr[2] for second and so on.