Couldn't perform click, button not found in: Error in Test Rigor - testrigor

Website link https://www.bio123.de/
Below is my piece of code
switch to tab "1"
click "Alles akzeptieren"
The button is not identified inside the pop up and error is thrown . Not only this none of the button inside the pop up is working and failing I have also tried to do enter escape that didnt work too

Try using the OCR suffix after the button name:
click "Alles akzeptieren" using OCR

Related

Flutter mobile app, clicking an existing and valid physical back button is not working, even though the Cucumber step succeeds

I am using JDK 1.8_202, appium 2.0.0-beta.46, node v18.12.0
There is a programmer developed back button (<--) whose className as "android.widget.Button" whose className as "android.widget.Button", but when I try to verify it using search option, I am getting this pop up.
Programmatically nothing is happening, even though as a CucumberBDD step, it is showing as executed.
I am executing on locally connected physical device 'Samsung galaxy note 8'
Why back button tap/click action is not working even when it is executed??
I open my flutter mobile app. I am at landing page
Do some navigation forward. Comeback to a dashboard page
From dashboard page to get back to landing page, there is a back button like (<--), which I manual tap and can get back to landing page, with no problem.
Programmatically nothing is happening, even though as a CucumberBDD step, it is showing as executed.
From Appium Inspector I see it's className as "android.widget.Button", but when I try to verify it using search option, I am getting this pop up.
The same button with the same click() method is working fine in another scenario.
I am using JDK 1.8_202, appium 2.0.0-beta.46, node v18.12.0
Does the previous navigation affects the functioning of the button click() action ? It should not be logically.
Why back button tap/click action is not working even when it is executed??

WebDriverError: unknown error: Element is not clickable at point (330, 367) even after using EC.elementToBeClickable

I am writing test cases in protractor using chromedriver
I have a link which when clicked gives an overlay div pop up where I can enter few details and Add details. After adding the details again the main page and link is visible. But when I am trying to click on the main link second time I am getting
WebDriverError: unknown error: Element is not clickable at point (330, 367). Other element would receive the click:
I tried using the below code still issue is not resolved
browser.wait(EC.elementToBeClickable(link)).then(function(){
link.click().then(function(){
browser.sleep(3000).should.notify(next);
});
});
Can someone please help
I have seen this in my application before, Once you close the pop-up you have to wait for the window closing animation to finish. Your flow should be something like below
browser.wait(EC.elementToBeClickable(link),5000)
//Fill the pop-up
element(by.css('.textArea')).sendKeys('jhghaskjdhkjasd')
//close the pop-up
element(by.css('.close')).click()
//wait for the pop-up to close
browser.wait(ExpectedConditions.invisibilityOf(element(by.css('.pop-up'))),5000)
Also as a side point, you don't need to chain all webdriverJs promises.They are already placed in queue using Protractor control flow

Protractor : How to select an item from list when right-clicked

I am trying to Right click on an element and then select an option "Rename" from the list. I have got "right clicking" working but can't select option from the list. Referred links 1, 2
Note 1:
1: On right click the menu options that are visible are native context menus. So, they don't appear in my DOM that I can see.
2: The App runs only in Chrome browser(not sure if it is a browser issue)
I have tried the following code:
browser.actions().mouseMove(elementVar).perform();
browser.actions().click(protractor.Button.RIGHT).click(protractor.Button.ARROW_DOWN).click(protractor.Button.ARROW_DOWN).click(protractor.Button.ARROW_DOWN).perform();
Consider, "Rename" to be the third option in the list.
Note 2:
If I am just running the app and enter 'R' from my keyboard, it selects the "Rename" option. But when I tried to run it in my test, it doesn't select the "Rename" option. See below code I tried:
browser.actions().mouseMove(elementVar).perform();
browser.actions().click(protractor.Button.ARROW_RIGHT).sendKeys('R',protractor.Key.ENTER).perform();
None of the above code works. Let me know if more information is required.
EDIT:
I am guessing the following to be happening:
once I mouse over, the script "right clicks" and after that the "tooltip" is displayed. Since the "tooltip" is displayed after "right click" I think the menu list goes to the background(the list is still visible along with the tool-tip), which is why the arrow down keys aren't working. Is this possible? If yes, how can I wait for the tooltip to be invisible and then right click?
Input: I tried to wait for tool-tip to be invisible and then right click, but still the "Arrow_down" doesn't work.
Is there a way to bring the menu list in the front once we have right clicked?
IMPORTANT:
I took a screenshot after I right clicked on the element, and the screenshot doesn't show the "menu list". Below is the code for screenshot:
browser.actions().click(protractor.Button.RIGHT).perform()
.then(function() {
browser.takeScreenshot().then(function(screenShot) {
writeScreenShot(screenShot, "image.png");
});
});
//writeScreenShot takes two variables actual screenshot data and the file name. And the screenshot is saved as "image.png"
What needs to be done?
When you send ARROW keys to the browser, you have to send them as keys instead of passing them to click() function and the ARROW_DOWN key is part of Key object and not BUTTON. Here's how -
browser.actions().mouseMove(elementVar).perform();
browser.actions().click(protractor.Button.RIGHT).sendKeys(protractor.Key.ARROW_DOWN).sendKeys(protractor.Key.ARROW_DOWN).sendKeys(protractor.Key.ARROW_DOWN).perform();
For your second try, you should send RIGHT in the place of protractor.Button.ARROW_RIGHT to right click. When you send two actions/keys to sendKeys() function, you have to join them using chord object which combines the action of pressing two keys at a time(ex: CTRL+C for copy). But in your case i don't think its really necessary. Here's how to use it -
browser.actions().mouseMove(elementVar).perform();
browser.actions().click(protractor.Button.RIGHT).sendKeys(protractor.Key.chord("r", protractor.Key.ENTER).perform(); //Not necessary as you wont be pressing R+ENTER in your keyboard
OR
browser.actions().click(protractor.Button.RIGHT).sendKeys('R').sendKeys(protractor.Key.ENTER).perform();
Hope this helps.
use XPath to solve your problem
browser.actions().mouseMove(target).perform();
browser.actions().click(protractor.Button.RIGHT).perform();
element(by.xpath('//*[#id="context-menu"]/ul/li[1]')).click();
In your case it will be "//*[#id="context-menu"]/ul/li[3]" most probably.

WWW::Selenium to capture component refresh

I am writing a perl script using WWW::Selenium module to automate a website.
I am not at all a web development guy and have no idea about web technologies.
Let me try to explain the issue in layman terms.
I am dealing with a webpage, which has an order form with a button.
When I click the button, there is no page submit, but the button label changes.
Say for eg, the button goes through these changes when clicked multiple times.
Get Quote --> Order --> Confirm Order
Each time I click the button, there is no page refresh, but the button label keeps changing as above.
The id of the button is the same throughout, only the class changes.
How can I do this in WWW::Selenium?
Presently I am using wait_for_page_to_load(5000) after each click.
But the click is not having any effect on the label and I get error that timed out after 5000s.
Should I be using some other function to wait?
You could do something like this
$sel->wait_for_text_present_ok("Your text","time to wait","The message to display if this fails");
and an example below-
$sel->wait_for_text_present_ok("Order Confirmed","9000","The order was successfully placed");
Seems like you could use
$class = $sel->get_attribute($attribute_locator)
where the $attribute_locator is the button#class with button being the element locator that you clicked. Check if $class is the class you expect.

Unable to locate WindowID

I am currently testing a web app using selenium rc with eclipse. I've been having issues with a single pop up window which appears when a submit button is clicked. The confirmation window appears with a single 'ok' option.
I've also tried 'chooseOKonnextConfirmation' in conjunction with .getConfirmation but eclipse tells me no confirmation exists. I've tried inspecting the window itself with firebug but have been unable to get any results.
I also tried with "selenium.selectWindow(getAllWindowIDs ()[1]);" but selenium not recognizing "getAllWindowIDs".
Could somebody please tell me how I can retrieve the windowID and the associated API commands I need to implement to get rid of this problem?
from your description, i understand that you have an ALERT window being appeared after clicking SUBMIT button but not the CONFIRMATION window.
if my understanding is correct
( you said single OK button - ALERT window appears with single OK button - CONFIRMATION window appears with OK and CANCEL buttons - there is another window javascript can generate which is CONFIRMATION.it appears with TEXT field and OK and CANCEL buttons )
so you must use accordingly.
here is what you should use
if(selenium.isAlertPresent()) {
String message = selenium.getAlert();
}
this will consume you Alert window and you can check the message displayed on Alert window if you want.
if this is not please post write your comment
It's selenium.getAllWindowIds(); note the capitalisation. Don't forget to make sure the popup has already appeared (e.g. selenium.waitForPopUp()).
Yes sudarsan is correct if you have an alert.
If you have an popup window not an alert with OK button then you have to click OK when popup appears.
If you are unable to locate the button use firebug to locate the element.