how I can get output after clicking submit button like Name saurav - vue.js

[code[][code 2[code 3][1]]][2]
please see this
[1]: https://i.stack.imgur.com/WMpkG.png
[2]: https://i.stack.imgur.com/ZoW2w.png

Related

"Assert" on quick spinner don't work [Selenium IDE]

I have Something like that on my selenium IDE :
click | button
assert element present | id=spinner
assert element present | id=label
I click on a button and a spinner is shown (an element HTML is created) for the loading, after that the spinner element is deleted and replace by a text element.
My problem is this first assert command don't see this spinner may be it's too fast for it (2-3 sec)… In case where the spinner is during more time as 10 sec and not after a click it's working.
So have you an idea ?
My tries :
Replace click by a send key
Place n transition command between click and the first assert
Thanks
Ps : Mozilla V56.0, Selenium IDE V3.12.3
Edit : To be more explicit, I want to assert my spinner is present
You use wrong command, see assert command description. To check spinner presence you should use assert element present command like this:
assert element present | id=spinner |

How to press enter when searching in the drop down list

I have a dropdownlist and you can type the text for searching keyword. After that you need to select the searching result or press to enter.
My code is written as follows:
Utils.driver.findElement(ProductObject.ddlDummyUnit).click();
Utils.driver.findElement(ProductObject.txtUnit).sendKeys(CommonExcel.readCellData(indexR, 3, ExcelWSheet));
But i don't known how to press enter when searching in the drop down list.
Please help me!
I got it. Note for anyone who had similar problems :)
import org.openqa.selenium.Keys;
Utils.driver.findElement(ProductObject.ddlDummyUnit).click();
WebElement Unit = Utils.driver.findElement(ProductObject.txtUnit);
Unit.sendKeys(CommonExcel.readCellData(indexR, 3, ExcelWSheet));
Unit.sendKeys(Keys.ENTER);
You can also try with selenium action builder for generating a sequence of actions though it not available for all browsers.
Check out this link,
https://github.com/SeleniumHQ/selenium/wiki/Advanced-User-Interactions

Java Selenium - How to Click a Button that has no ID or ng-class in AngularJS based page

The following code I've used is not clicking the button and showing the error message.
WebElement clickNextButton = webDriver.findElement(By.cssSelector("button[ng-class='btn-success']"));
clickNextButton.click();
Error message shows "no such element: Unable to locate element. {"method":"css selector","selector":"button[ng-class='btn-success']"}
I've also tried the following code segments without success:
WebElement clickNext1 = webDriver.findElement(By.cssSelector("button[ng-class='pccCTRL.pow.Page1InputsValid() ? 'btn-success' : 'btn-default'']"));
clickNext1.click();
webDriver.findElement(By.partialLinkText("Next")).click();
webDriver.findElement(By.cssSelector("button[type='button']")).click();
Here is the screenshot showing the html code segment of the button I'm trying to
Hoping to get feedback. Thank you.
Ok, I was able to solve this issue by using By.xpath
Here is the code segment that solved it:
WebElement clickNextButton = webDriver.findElement(By.xpath("//button[contains(text(),'Next')]"));
clickNextButton.click();

Selenium StoreText invalid xpath[2] error

I am new to selenium.
I tried to save a text from the xpath using storeText and the target is //*[#id='mathq2'].
the base URL is http://timesofindia.indiatimes.com/.
I am getting this error
[info] Executing: |storeText | //*[#id='mathq2'] | wwww |
[error] Invalid xpath [2]: //*[#id='mathq2']
Hi Danny got the same error in timesof india website. This is what i did.
I recorded the element (by entering something in the text box next to it) then clicked on the value like 8+0 = and then selected the radio button above it.
So my selenium showed
click id=mathq2
from there i chose the xpath in the Target dropdown and the xPath seemed to show
//span[#id='mathq2']
so finally I replaced my step for storeText as
storeText //span[#id='mathq2'] addition
and then it stored that value 8+0 = in the variable 'addition'.
You are getting this error, because there is no element with such xPath at the main page of http://timesofindia.indiatimes.com/.
Why do you think it is there?
You can use xPath Checker (Firefox plugin) to check if the xPath is proper and the element exists.
yes, ID is there, but text is changing dynamically.
You need to add the xpath= prefix in your target, and it seems that the xpath is also prepended with a period:
|storeText | xpath=.//*[#id='mathq2'] | wwww |
You would also need to ensure that your script waits for the initial advertisement page to unload.

How can I store a dynamic text value in selenium ide and use it later in different window

I am new in selenium and trying to learning. I am creating a script and I got stuck here, I want to store a dynamic value from text message on web page ex. " Event Name:Test" this Event Name is dynamic and I want to store this and want to get in other window. In 2nd window i want to use this value(Test) to verify in the page
I tried storeValue, StoreText and storeAttribute command and getting error message for xpath or "element not found".
Please help me and advice me , what should I do?
Can You please suggest me the Xpath for storing and retrieving the event name. Please help me...
Thanks in advance,
Niru
If you are using the same test-case to navigate from page 1 to page 2 you can use the storeText function in the IDE to store the value of your event name. And then you can use the same variable in the page 2 for verification.
For example, in page 1 to store the value of event you use:
storeText(locator1, temp)
And then on page 2 you use assert:
assertText(locator2, ${temp})