Timed out retrying after 60000ms: Expected to find element: undefined, but never found it - automation

.click()
843 | cy.xpath(this.clickOnclickOnClearLocationTextboxFilter)
> 844 | .should('be.visible')
| ^
845 | .click()
846 | }
I just trying to click on side filter bar close button under a textbox, but it throws an error so just wanted to know how can I resolve it to by using cypress

Related

stuck at "unresolved import" Rust Embedded

I am new to Rust and I am working in embedded development. I am making a project to blink the led of the stmf3 board. But I am getting errors while using the command cargo build
This Repo contains my code and structure. I am really stuck here. Can someone please a way to solve this?
The error I am getting is:
error[E0433]: failed to resolve: unresolved import
--> src/main.rs:4:12
|
4 | use crate::config::initialization::{entry,mycrate,OutputSwitch,stm32f3xx_hal::prelude::*};
| ^^^^^^
| |
| unresolved import
| help: a similar path exists: `blink_stm32::config`
error[E0432]: unresolved imports `crate::config::initialization::entry`, `crate::config::initialization::mycrate`, `crate::config::initialization::OutputSwitch`
--> src/main.rs:4:37
|
4 | use crate::config::initialization::{entry,mycrate,OutputSwitch,stm32f3xx_hal::prelude::*};
| ^^^^^ ^^^^^^^ ^^^^^^^^^^^^
error: cannot find attribute `entry` in this scope
--> src/main.rs:6:3
|
6 | #[entry]
| ^^^^^
error[E0425]: cannot find function `mycrate` in this scope
--> src/main.rs:9:29
|
9 | let (leds, mut delay) = mycrate();
| ^^^^^^^ not found in this scope
|
help: consider importing this function
|
4 | use blink_stm32::config::initialization::mycrate;
|

verifyAlertNotPresent() in selenium ide halts the execution on failure

I have written a script to Verify that alert is not present using verifyAlertNotPresent command. Using this command as I know execution should not stop even if alert is present and should continue but it halts the execution. My script is given below.
forXml | file:///E:/XML files/NAA_StateZip.xml
open |
clickAndWait | link=NAA Click & Lease
type | name=_OWNER | sdfsdf
type | name=OWNERFAX | 1234556
fireEvent | name=OWNERFAX | blur
verifyAlertNotPresent | Error: Invalid input format Please re-enter area code and phone number |
close
selectWindow | null
endForXml
When I am running this script Log shows this.
[info] Executing: |type | name=OWNERFAX | 1234556 |
[info] Executing: |fireEvent | name=OWNERFAX | blur |
[info] Executing: |verifyAlertNotPresent | Error: Invalid input format Please re-enter area code and phone number | |
[error] true
[info] Executing: |close | | |
[error] There was an unexpected Alert! [Error: Invalid input format Please re-enter area code and phone number]
[info] Test case fail
Please provide solution to this as I want to run this script for set of data.
To handle alerts using Selenium IDE, you will have to use 'assertFoo(pattern)' function. If you fail to assert the presence of a pop-up your next command will be blocked and you will get an error. Look at the Docs.

Running RobotFramework Tests on Sauce Labs - error with timing out

I have existing selenium tests written in Robot IDE Framework that I'm trying to run in Sauce Labs.
I'm using the sample test from this tutorial to see if I can get at least one test running. http://datakurre.pandala.org/2014/03/cross-browser-selenium-testing-with.html
The test passes locally, and passes all the tests on Sauce Labs, but then times out and gives and error, "Test did not see a new command for 90 seconds. Timing out.
error" because it's not disconnecting Remote Web Driver.
I've tried all of these, together and separately at the end of the "Close test browser" function:
Close all browsers
Process close
Stop selenium server
I've also tried adding ((RemoteWebDriver) getCurrentWebDriver()).quit() in one of the python functions that runs during the closing process. I'm new to Selenium and Robot Framework, so I'm not sure how to grab the Remote Web Driver.
Here is the code, in case that helps:
*** Settings ***
Test Setup Open test browser
Test Teardown Close test browser
Resource ../../Keywords/super.txt
Library Selenium2Library
Library ../../Library/SauceLabs.py
*** Variables ***
${LOGIN_FAIL_MSG} Incorrect username or password.
${COMMAND_EXECUTOR} http://username:key#ondemand.saucelabs.com:80/wd/hub
${REMOTE_URL} http://username:key#ondemand.saucelabs.com:80/wd/hub
${DESIRED_CAPABILITIES} username:name,access-key:key,name:Testing RobotFramework,platform:Windows 8.1,version:26,browserName:CHROME,javascriptEnabled:True
*** Test Cases ***
Incorrect username or password
[Tags] Login
Go to https://saucelabs.com/login
Page should contain element id=username
Page should contain element id=password
Input text id=username anonymous
Input text id=password secret
Click button id=submit
Page should contain ${LOGIN_FAIL_MSG}
[Teardown]
*** Keywords ***
Open test browser
Open browser http://www.google.com ${BROWSER} \ remote_url=${REMOTE_URL} desired_capabilities=${DESIRED_CAPABILITIES}
Close test browser
Run keyword if '${REMOTE_URL}' != '' Report Sauce status ${SUITE_NAME} | ${TEST_NAME} ${TEST_STATUS} ${TEST_TAGS} ${REMOTE_URL}
Close all browsers
Process close
Stop selenium server
You shouldn't need to do anything special to close down the connection. My guess is, there's something in your test that is preventing the browser from being closed. My recommendation is to start with a simpler example, and start from the command line. Get that working, and then work your way up to being able to run something more complex from within RIDE.
Here is a working example where I removed all of the extra stuff in the test. I am able to run this both from the command line and via RIDE on Windows. You'll have to add in your own key, however:
*** Settings ***
| Library | Selenium2Library
*** Variables ***
| #{_tmp}
| ... | name:Testing RobotFramework Selenium2Library,
| ... | browserName:internet explorer,
| ... | platform:Windows 8,
| ... | version:10
| ${CAPABILITIES} | ${EMPTY.join(${_tmp})}
| ${KEY} | <put your username:key here>
| ${REMOTE_URL} | http://${KEY}#ondemand.saucelabs.com:80/wd/hub
| ${URL} | https://saucelabs.com/login
| ${LOGIN_FAIL_MSG} | Incorrect username or password.
*** Test cases ***
| Example of connecting to saucelabs via robot
| | [Setup]
| | ... | Open Browser
| | ... | ${URL}
| | ... | remote_url=${REMOTE_URL}
| | ... | desired_capabilities=${CAPABILITIES}
| |
| | Page should contain element | id=username
| | Page should contain element | id=password
| |
| | Input text | id=username | anonymous
| | Input text | id=password | secret
| | Click button | id=submit
| |
| | Page should contain | ${LOGIN_FAIL_MSG}
| |
| | [Teardown] | Close all browsers

Selenium finds element only when I manually click Execute

I need to click on the button automatically. Code:
<tr>
<td>click</td>
<td>css=button</td>
<td></td>
When I click "Play current test case" it does not finds the element. But when I click "Find" after that - it does, and if I click Execute - it clicks on it!
Log:
[info] Executing: |click | css=div.sometag > p | |
[info] Executing: |pause | | 2000 | // Same error with pause & without it
[info] Executing: |clickAndWait | css=button | | // Auto executing
[error] Element css=button not found // Fails
[info] Executing: |click | css=button | | // I click on "Execute" manually - OK!
Why?
Have you tried to insert "waitForElementPresent|css=button|" before the click statement? This might help.
You actually need to use the class selector. So either div.button or .button, otherwise selenium probably is looking for an ID or an element name.
You could also try using a different type of locator, such as ID or XPath.
If we were able to see the HTML of the page you are interacting with, we could provide exact examples.

"result is null" error when working around _blank deficiency in Selenium IDE

Using a workaround to be able to check the contents of a new tab, I get unexpected results. If I play the test case, the following line fails:
storeEval | javascript{"selenium.browserbot.getCurrentWindow().open('', 'my_window')"} | my_window
with the following error message:
[error] Threw an exception: result is null
The following alternative statements show the exact same symptoms:
getEval | window.open("", "my_window")
getEval | selenium.browserbot.openWindow("", "my_window")
Now, if I double-click it, it doesn't fail, but it opens up a new window, which I think the original solution didn't intend (the next step is to click on a link in the parent window, after all). At this point I can click on the parent window, manually run the next step to launch the link, manually change back to the child window (selectWindow | my_window says it can't find that window), and manually run each of the following steps to check the contents of the new window.
How do I proceed from here to make the test properly automatic?
Update: There is a built-in action for opening windows, but it also fails. Maybe this verbatim log output can shed some light on what's going on:
[info] Executing: |store | license_window | windowName |
...
[info] Executing: |openWindow | | ${windowName} |
[error] Unexpected Exception: fileName -> chrome://selenium-ide/content/recorder.js, lineNumber -> 74
The relevant lines from recorder.js:
66: window.open = function(url, windowName, windowFeatures, replaceFlag) {
...
74: if (result.wrappedJSObject) {
75: result = result.wrappedJSObject;
76: }
It seems that your browser doesn't allow pop-up for your web site. Go to options > Content > Exceptions for block pop-up windows and add your web site address.