Calling button having API call using Selenium 4 - java

My application is having a page where we select a specific country and click on submit button, then it will call APIs related to specific country. But using selenium 4 that API calls are not properly calling when we click on submit button, I tried using action.moveToElement().build.perform, JsClick, Click() and submit functionalities to click on submit button. However button action is perform and able to proceed to next page but API calls are not calling for specific selected country on click.
Is there way to do this action. This issue exist only for Selenium 4 and we used devtools concept for chrome browser in selenium 4.
Required this functionality in Selenium 4 only

Related

Web application(vue.js) is not recognising the value selected from dropdown using selenium

I am facing one issue while automating the web application designed using vue.js
Requirement/scenario: We have a screen where we need to select all the values(3 fields text field, dropdown, and calendar) then the Next button will be enabled.
When I ran manually this scenario its working fine but when I tried to automate this scenario I am facing an issue with dropdown.
Issue:
Using selenium I am able to select a value from the dropdown but it's not getting recognized hence Next button is not getting enabled. When I am trying to select a value manually by keeping debug point at that place it's working perfectly.
I tried the below ways but no luck
Using JavascriptExecutor
Using Actions call
Using Key events
I tried with Robot class
Select class
Thank you in advance
Adding screenshots as well:
Manual:
enter image description here
Automation:
enter image description here

Elements on Upper part of WebPages goes behind the screen or Disappear from Screen while running Selenium Tests

I am using Selenium web driver with Java in test automation framework of WebApplication which is portlet based using Java.My workflow is...
On Wizard Page-1: a container available having 2-3 input/edit boxes, some dropdown list(using Select class) and few buttons. That is like Wizard. After entering all required data on wizard of page-1. then click to Next button to navigate to Wizard Page-2.
On Wizard Page-2: First option is dropdown list where we use Select class i.e. selectByValue/selectByIndex etc.But during of after this action,application showed like scrolling up. But when we observed, actually it hides the first line of all webelements on Page-2.
I am sharing the screenshots for problem. Shared two images are, one is before action or real screen and second one is which hides few web element after the action.
image can be accessed: https://drive.google.com/open?id=0By2IDRpIvYf7SnphOVB4R1N3aTg

CRM 2015 Automation Testing using selenium, Change Focus after Click

I'm using Selenium scripts using Java to automate a project in CRM 2015. When I tried to click on a button using IE Webdriver it navigates correctly but focus still on clicked button and then cannot find any controls as It's implement using Single App page. Could you please give me workaround ? I tried :
driver.switchTo().defaultcontent();
driver.switchTo().ActiveElement();
but not working and still on clicked button focus.

how to access hidden button on a page?

I'm developing a program to navigate and perform actions on a page (scraper).
I'm using Java 8 + Jaunt API and I can fill forms of many pages around the web and submit this data.
I'm trying to access my profile in college page but the submit button is hidden and is generated by other code type.
I don't know how can I reach this button.
I'll let one example below:

Unable to click on Submit button in Remote Machine where BitDefender is installed using Webdriver in Java. Please find the details below

Unable to click on Submit button in Remote Machine where BitDefender is installed using Webdriver in Java. The issue is:
I have to execute my test scripts by creating a jar file in Remote Machine, where BitDefender is installed in it. when executing the jar file in IE browser in Remote Machine, I am Unable to click on Submit button (find Screenshot1), because the BitDefender tool bar is coming on Submit button when running it using Webdriver. I am getting an Exception here.
Actually when executing it Manually, I can click on Submit button with out any issues, i can click on it as in Screenshot2
Please can any one help me out on this issue without closing or moving the BitDefender tool bar in IE browser. Help will be appreciated.
Using the Actions() class.
Actions action = new Actions(driver);
action.moveToElement(driver.findElement(By.id("submit")).moveByOffset(x,y).click().build().perform();
//where x and y are the visible lower right corner of the button - you can find its dimensions from firebug or similar
Finally, if the element is actually part of a form you can just call the .submit() method on that form. Which would actually avoid having to click on the hidden button entirely.

Categories

Resources