*** Test Cases ***
SignUp
open browser ${url} ${browser}
maximize browser window
set selenium speed 2s
Click Element xpath://a[text()="Create New Account"]
input text name:firstname sneha
input password id:password_step_input Sneham#8989
select from list by label birthday_day 23
select radio button sex 1
click button xpath://a[text()="Sign Up"]
I Have tried the above code to Sign Up Facebook account.
Tried with different scenarios like with ID, Name, Xpath and Text; but none of those able to identify the element.
Please help with the above issue
The "Sign Up" is a button.
What about click button xpath://button[text()="Sign Up"] ?
Related
My app behave like this:
Add items -> user clicks Add button -> app return to main page
IF there are too many items, after user clicks Add button -> new dialog prompt 'waiting...', then user click OK button -> user click send button again
it is a loop if the new dialog prompt after send button is clicked. (from manual testing, this dialog could appear 2-3 times only).
I have written test case after click add ->
if there is dialog appear then click ok -> click add -> back to mainpage.
it is working fine when the new dialog appear.
I noticed if the new dialog does not appear, ROBOT still proceed to the ${VERIFIED} lines....this causing the script pausing for quite sometimes. no error but how do I get rid of it?
However the application may prompt the dialog many times when server loading is slow.
I want robot press this ok whenever dialog appear again then click add.
How do I achieve it?
Add Item
Click Add
${VERIFIED} Run Keyword And Return Status Wait Until Page Contains Element ${ANDROID-WIDGET-TEXT-VIEW}\[#text='Please wait'] 3s
Run Keyword If ${VERIFIED} Wait Until Page Contains And Click ${ANDROID-WIDGET-BUTTON}\[#text='OK']
Run Keyword If ${VERIFIED} Click Add
Wait Until Page Contains Navigation Bar Title MainPage
Im starting with robotframework, and Im not able to get correct selector for google search button. What Im doing wrong?
*** Settings ***
Documentation This is a basic test
Library SeleniumLibrary
*** Variables ***
${url} https://www.google.com
${browser} chrome
${text} css:input[name=q]
${search_button} css:input[name=btnK]
${expected_result} Test
*** Test Cases ***
User fill in the Search text box
[Documentation] The user search 'Test'
open browser ${url} ${browser}
wait until page contains ${url}
input text ${text} test
click button ${search_button}
wait until page contains ${expected_result}
sleep 5s
close browser
Everything seems to be perfect except the last part of clicking on search button. Also the indented import looks odd to me. May be its only me but I got error on that line in VS Code. Once I fixed that(just removed indentation). Actual problem of clicking on Search button will be solve by Press Keys keyword of selenium library. When we type something in the search box the autosuggestion overrides the search button. Instead of getting rid of dropdown just press the enter key as in below code -
User fill in the Search text box
[Documentation] The user search 'Test'
open browser ${url} ${browser}
wait until page contains ${url}
input text ${text} test
Press keys ${text} RETURN
wait until page contains ${expected_result}
sleep 5s
I'm making a trigger which fires on element click (Button) on my Add to cart button , When I click while on GTM Preview mode I cannot see the gtm.click in summary window , I also have clicked all the Click Variables inside Variables tab , what else can I do , or am I missing something?
I inspected the element of the button through firebug
Code:
class="btn-add-to-cart">ADD TO CART
The Trigger fires on
Some Clicks > Click Classes equals btn-add-to-cart
Tag Configuration
Track Type : Event
Label:{(Page URL)}
Advertising:
Enable Display Advertising Features Clicked
If that gtm.clicks tab shows I can inspect the Click Class variable for that and then it might work .
Currently it is not showing.
Did you enable the CLICKS from VARIABLE configuration ? Also make sure Tag is active
I am trying to automate button click to "www.truecaller.com" , but there are 2 issues :
- I can not get the button ID.
- seems that this button is always disabled. if I enter data manually to the phone number textbox , it is enabled. But if I filled data to this textbox automatically from my application , it will always stay disabled.
Thanks for support.
Walid
I'm trying to design a UI in Qt and I can't find anywhere in the designer a button which can be "droped down" like combobox. What I mean by that is that I would like to have this button with his "default" option choosen so if I like it I would have to just click on it but if I would like to choose different option I would be able to clik the little arrow on the right side of this button and then pick option suitable for me at that moment.
You're looking for a QToolButton that has a set of actions or a menu set on it. From the documentation, the QToolButton::ToolButtonPopupMode...
Describes how a menu should be popped up for tool buttons that has a menu set or contains a list of actions.
Of it's values, the two that I see most frequently are DelayedPopup:
After pressing and holding the tool button down for a certain amount of time (the timeout is style dependant, see QStyle::SH_ToolButton_PopupDelay), the menu is displayed. A typical application example is the "back" button in some web browsers's tool bars. If the user clicks it, the browser simply browses back to the previous page. If the user presses and holds the button down for a while, the tool button shows a menu containing the current history list
And MenuButtonPopup:
In this mode the tool button displays a special arrow to indicate that a menu is present. The menu is displayed when the arrow part of the button is pressed.